-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (41 loc) · 1.04 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
version: '3.9'
services:
backend:
container_name: "${APP_NAME}-backend"
build:
context: .
dockerfile: deployment/Dockerfile
args:
- APP_MODE=${APP_MODE}
- APP_NAME=${APP_NAME}
- APP_HOST=${APP_HOST}
- APP_PORT=${APP_PORT}
volumes:
- ./backend:/usr/src/app/
- ./deployment/scripts:/app/deployment/scripts/
environment:
- APP_MODE=test
env_file: .env
ports:
- "${APP_PORT}:${APP_PORT}"
depends_on:
db:
condition: service_healthy
command: [ "/bin/sh", "/app/deployment/scripts/django/start.sh" ]
db:
image: postgres:15.2-alpine
container_name: "${APP_NAME}-db"
hostname: "${POSTGRES_HOST:-db}"
volumes:
- postgres_data_dir:/var/lib/postgresql/data/
env_file: .env
expose:
- "${POSTGRES_PORT:-5432}"
shm_size: 1g
healthcheck:
test: [ "CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data_dir: