-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
executable file
·37 lines (36 loc) · 1017 Bytes
/
docker-compose.yaml
File metadata and controls
executable file
·37 lines (36 loc) · 1017 Bytes
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
services:
postgres:
image: postgres:15
container_name: auw_web_postgres_db
user: "999:999"
env_file:
- ${ENV_FILE:-./envs/.env}
environment:
POSTGRES_USER: ${POSTGRES_USER:-user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-webcrawldb}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- ${POSTGRES_DATA_DIR:-/mnt/nas/storage/webchat/db}:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-user} -d ${POSTGRES_DB:-webcrawldb}"]
interval: 10s
timeout: 5s
retries: 5
fastapi_app:
build:
context: .
dockerfile: Dockerfile
container_name: auw_web_app
ports:
- "0.0.0.0:${APP_PORT:-9012}:${APP_PORT:-9012}"
volumes:
- ${LOG_DIR:-./logs}:/app/logs
env_file:
- ${ENV_FILE:-./envs/.env}
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped