-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
52 lines (49 loc) · 1.38 KB
/
docker-compose.yaml
File metadata and controls
52 lines (49 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
services:
app:
build: .
container_name: coingecko-fetcher
restart: unless-stopped
ports:
- "8080:8080"
environment:
- COINGECKO_POSTGRES_DSN=postgres://coingecko_user:coingecko_password@postgres:5432/coingecko?sslmode=disable
- COINGECKO_API_URL=https://api.coingecko.com/api/v3
- COINGECKO_COIN_LIST=bitcoin,ethereum,solana,cardano,polkadot
- COINGECKO_FETCH_INTERVAL=1m
- COINGECKO_LOG_LEVEL=info
- COINGECKO_HTTP_PORT=8080
depends_on:
postgres:
condition: service_healthy
networks:
- coingecko-network
postgres:
image: postgres:14-alpine
container_name: coingecko-postgres
restart: unless-stopped
ports:
- "6789:5432"
environment:
POSTGRES_DB: coingecko
POSTGRES_USER: coingecko_user
POSTGRES_PASSWORD: coingecko_password
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U coingecko_user -d coingecko" ]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
networks:
- coingecko-network
volumes:
postgres_data:
driver: local
name: coingecko-postgres-data
networks:
coingecko-network:
driver: bridge
name: coingecko-network