forked from hicdex/hicdex
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
96 lines (90 loc) · 2.53 KB
/
docker-compose.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: "3.8"
services:
hicdex:
build: .
depends_on:
- db
volumes:
- ./src/hicdex:/home/dipdup/source/src/hicdex
- ./src/hicdex/dipdup.yml:/home/dipdup/dipdup.yml
- ./src/hicdex/dipdup-docker.yml:/home/dipdup/dipdup-docker.yml
- ./data/hicdex-metadata:/home/dipdup/metadata
command: ["-c", "dipdup.yml", "-c", "dipdup-docker.yml", "run"]
#command: ["schema", "approve"]
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
- ADMIN_SECRET=${ADMIN_SECRET:-changeme}
- MAILGUN_API_KEY=${MAILGUN_API_KEY:-}
- NOTIFIED_EMAILS=${NOTIFIED_EMAILS:-}
db:
image: postgres:13
shm_size: 6g
ports:
- 6423:5432
restart: always
volumes:
- ./data/pg:/var/lib/postgresql/data
environment:
- POSTGRES_USER=dipdup
- POSTGRES_DB=dipdup
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dipdup"]
interval: 10s
timeout: 5s
retries: 5
hasura:
image: hasura/graphql-engine:latest
# ports:
# - 8081:8080
expose:
- 8080
depends_on:
- db
restart: always
environment:
- HASURA_GRAPHQL_DATABASE_URL=postgres://dipdup:${POSTGRES_PASSWORD:-changeme}@db:5432/dipdup
- HASURA_GRAPHQL_ENABLE_CONSOLE=true
- HASURA_GRAPHQL_ENABLED_LOG_TYPES=startup, http-log, webhook-log, websocket-log, query-log
- HASURA_GRAPHQL_ADMIN_SECRET=${ADMIN_SECRET:-changeme}
- HASURA_GRAPHQL_UNAUTHORIZED_ROLE=user
backup:
container_name: backup
image: prodrigestivill/postgres-backup-local
restart: always
user: postgres:postgres # Optional: see below
volumes:
- ./data/backups:/backups
links:
- db
depends_on:
- db
#ports:
# - 8082:8082
environment:
- TZ=Europe/Paris
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=dipdup
- POSTGRES_USER=dipdup
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
- POSTGRES_EXTRA_OPTS=-Z6 --clean --schema=public --blobs
- SCHEDULE=*/30 * * * *
- BACKUP_KEEP_DAYS=7
- BACKUP_KEEP_WEEKS=4
- BACKUP_KEEP_MONTHS=6
- HEALTHCHECK_PORT=8082
caddy:
image: caddy:2.4.0-alpine
depends_on:
- "hasura"
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ../hicdex-graphiql:/srv/api.hicdex.com
- ./Caddyfile:/etc/caddy/Caddyfile
- /opt/caddy_data:/data
- /opt/caddy_config:/config