-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
53 lines (51 loc) · 1.44 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
services:
postgres:
container_name: postgres
image: postgres
environment:
POSTGRES_DB: ${DB_NAME:-purplecaffeine}
POSTGRES_USER: ${DB_USER:-purplecaffeine}
POSTGRES_PASSWORD: ${DB_PASSWORD:-purplecaffeinepassword}
ports:
- 5432:5432
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- safe-tier
restart:
always
api_server:
container_name: purplecaffeine
image: purplecaffeine:latest
build:
context: ./api_server/
dockerfile: ./docker/Dockerfile
environment:
SERV_KEY: ${SERV_KEY:-test}
DEBUG: ${DEBUG:-0}
DB_NAME: ${DB_NAME:-purplecaffeine}
DB_USER: ${DB_USER:-purplecaffeine}
DB_PASSWORD: ${DB_PASSWORD:-purplecaffeinepassword}
DB_HOST: postgres
DB_PORT: 5432
DB_SCHEMA: ${DB_SCHEMA:-public}
DJANGO_SUPERUSER_USERNAME: ${DJANGO_SUPERUSER_USERNAME:-admin}
DJANGO_SUPERUSER_PASSWORD: ${DJANGO_SUPERUSER_PASSWORD:-admin}
DJANGO_SUPERUSER_EMAIL: ${DJANGO_SUPERUSER_EMAIL:[email protected]}
ports:
- 8000:8000
healthcheck:
test: "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://127.0.0.1:8000/health_check/"
interval: 10s
timeout: 5s
retries: 5
networks:
- safe-tier
depends_on:
postgres:
condition: service_healthy
networks:
safe-tier: