-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
61 lines (54 loc) · 1.1 KB
/
docker-compose.yaml
File metadata and controls
61 lines (54 loc) · 1.1 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
53
54
55
56
57
58
59
60
61
x-env_file:
&env-file
env_file:
- ./.env
- ./.env.${NODE_ENV}
x-network:
&network
networks:
- postgres-network
x-restart-policy:
&restart-policy
restart: always
x-logging:
&logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
services:
database:
<<: [*env-file, *network, *restart-policy, *logging]
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, *logging]
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: