-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
58 lines (58 loc) · 1.79 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
version: "3.9"
services:
server:
build:
context: ./server
dockerfile: ../Dockerfile.server
command: >
sh -c "python manage.py migrate &&
python manage.py shell --command 'from management.api import get_or_create_base_admin; get_or_create_base_admin()' &&
python manage.py collectstatic --noinput &&
sh ./entry.sh"
volumes:
- ./server:/server
ports:
- "8000:8000"
environment:
- DEBUG=0
- BASE_ADMIN_USERNAME=admin
- BASE_ADMIN_USER_PASSWORD=password
- CELERY_BROKER_URL=redis://host.docker.internal:6379
- SECRET_KEY=django-insecure-osb4ll4%1--hnixv6+bl4025%jvj2rm96fk0!+4%n#=pbw+wu-
- BASE_URL=http://localhost:8000
network_mode: bridge
extra_hosts:
- "host.docker.internal:host-gateway"
profiles: [ "default", "backend", "dev" ]
redis:
image: redis:5
ports:
- "6379:6379"
network_mode: bridge
extra_hosts:
- "host.docker.internal:host-gateway"
profiles: ["default", "redis", "dev", "stage", "prod"]
server_prod:
build:
context: ./server
dockerfile: ../Dockerfile.server
command: >
sh -c "python manage.py migrate &&
python manage.py shell --command 'from management.api import get_or_create_base_admin; get_or_create_base_admin()' &&
python manage.py collectstatic --noinput &&
sh ./entry.sh"
volumes:
- ./server:/server
ports:
- "8000:8000"
environment:
- DEBUG=0
- BASE_ADMIN_USERNAME=I wont tell you
- BASE_ADMIN_USER_PASSWORD=I wont tell you
- CELERY_BROKER_URL=I wont tell you
- SECRET_KEY=I wont tell you
- BASE_URL=I wont tell you
network_mode: bridge
extra_hosts:
- "host.docker.internal:host-gateway"
profiles: [ "default", "backend", "prod"]