-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
53 lines (47 loc) · 995 Bytes
/
docker-compose.yaml
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
x-env_file:
&env-file
env_file:
- ./.env
- ./.env.${NODE_ENV}
x-network:
&network
networks:
- postgres-network
x-restart-policy:
&restart-policy
restart: always
services:
database:
<<: [*env-file, *network, *restart-policy]
build:
context: .
dockerfile: ./Database.Dockerfile
args:
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "${DATABASE_PORT:-5432}:5432"
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
test: "pg_isready -U ${POSTGRES_USER}"
interval: 1s
timeout: 1s
retries: 60
bot:
<<: [*env-file, *network, *restart-policy]
environment:
- NODE_ENV=${NODE_ENV}
build:
context: .
dockerfile: ./Dockerfile
command: dotenvx run --convention=nextjs -- yarn start
volumes:
- bot_logs:/var/log/datadrop/
depends_on:
database:
condition: service_healthy
volumes:
postgres:
bot_logs:
networks:
postgres-network: