-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (50 loc) · 1.09 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
version: '3.9'
services:
db:
container_name: db
hostname: db
image: postgres:latest
ports:
- "5432:5432"
expose:
- 5432
healthcheck:
test: ["CMD", "pg_isready -U ${DATABASE_USER:-pguser} -d ${DATABASE_NAME:-huntag}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
env_file:
- .env
environment:
POSTGRES_USER: ${DATABASE_USER:-pguser}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-pgpwd}
POSTGRES_DB: ${DATABASE_NAME:-huntag}
restart: always
networks:
- default
bot:
container_name: bot
hostname: bot
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
expose:
- 8000
env_file:
- .env
environment:
DATABASE_USER: ${DATABASE_USER:-pguser}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-pgpwd}
DATABASE_HOST: ${DATABASE_HOST:-db}
DATABASE_PORT: ${DATABASE_PORT:-5432}
DATABASE_NAME: ${DATABASE_NAME:-huntag}
networks:
- default
depends_on:
- db
networks:
default:
driver: bridge