-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (39 loc) · 1.15 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
version: '3.8'
services:
app:
build: .
container_name: misinformation_mitigation_api
ports:
- "8001:8001"
volumes:
- .:/app
environment:
- DATABASE_URL=${DATABASE_URL:-postgresql://will:nordai123@misinformation_mitigation_db/mitigation_misinformation_db}
depends_on:
misinformation_mitigation_db:
condition: service_healthy
command: [ "/app/docker-entrypoint.sh" ]
misinformation_mitigation_db:
container_name: misinformation_mitigation_db
image: postgres:13
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./pg_hba.conf:/etc/postgresql/pg_hba.conf
environment:
- POSTGRES_USER=${DB_USER:-will}
- POSTGRES_PASSWORD=${DB_PASSWORD:-nordai123}
- POSTGRES_DB=${DB_NAME:-mitigation_misinformation_db}
- POSTGRES_PORT=${DB_PORT:-5432}
command:
- "postgres"
- "-c"
- "hba_file=/etc/postgresql/pg_hba.conf"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER:-will} -d ${DB_NAME:-mitigation_misinformation_db}" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data: