-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
73 lines (69 loc) · 2.19 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
services:
# Dev environment services (on local machine)
db:
image: postgres:14
restart: always
volumes:
- postgres_db_dev_local:/var/lib/postgresql/data
environment:
- POSTGRES_NAME=${DB_NAME}
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U", "${DB_USERNAME}"]
interval: "10s"
timeout: "5s"
retries: 5
start_period: "10s"
bfportal:
build:
context: .
dockerfile: docker/Dockerfile
target: dev
restart: no
command: bash -c "python manage.py migrate --noinput && python manage.py ensure_superuser --username bfportal --email [email protected] --password 1234 && python manage.py ensure_initialization && python manage.py mock -u 10 -e 50 --noregen && python manage.py runserver 0.0.0.0:8000"
container_name: bfportal_dev_local
ports:
- "8000:8000"
volumes:
- ./bfportal:/app
environment:
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
- DISCORD_SECRET=${DISCORD_SECRET}
- DB_NAME=${DB_NAME}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- POSTGRES_HOST=db # takes precedent over .env file
- DEBUG=True
- APPROVAL_CHANNEL_WEBHOOK_TOKEN=${APPROVAL_CHANNEL_WEBHOOK_TOKEN}
- APPROVAL_CHANNEL_WEBHOOK_ID=${APPROVAL_CHANNEL_WEBHOOK_ID}
- APPROVAL_SUCCESS_CHANNEL_WEBHOOK_TOKEN=${APPROVAL_SUCCESS_CHANNEL_WEBHOOK_TOKEN}
- APPROVAL_SUCCESS_CHANNEL_WEBHOOK_ID=${APPROVAL_SUCCESS_CHANNEL_WEBHOOK_ID}
- PRODUCTION_HOST=${PRODUCTION_HOST}
- PRODUCTION_PORT=8000
- OWNERS=${OWNERS}
- DEVEL_PORT=8000
healthcheck:
test: curl -fk http://0.0.0.0:8000/api/experiences || exit 1
interval: "10s"
timeout: "5s"
retries: 5
start_period: "10s"
depends_on:
- db
tailwind:
build:
context: .
dockerfile: docker/dockerfile
target: dev
command: npm run watch
restart: always
container_name: bfportal_dev_local_tailwind
volumes:
- ./bfportal:/app
depends_on:
bfportal:
condition: service_healthy
stdin_open: true
volumes:
postgres_db_dev_local: