-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
78 lines (72 loc) · 2.29 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
74
75
76
77
78
version: '3'
services:
djangoapp:
container_name: djangoapp-${ENVIRONMENT_NAME}
build:
context: ./
dockerfile: ./docker/cpmonitor/Dockerfile
image: cpmonitor:${ENVIRONMENT_NAME}
user: "1007"
volumes:
- ${DB_PATH?:Please set the DB_PATH environment variable.}:/db
- static_volume:/static
- ${IMAGES_PATH?:Please set the IMAGES_PATH environment variable.}:/images
- nginx_config_volume:/nginx/conf.d
- nginx_extras_volume:/nginx/extras-${ENVIRONMENT_NAME}
- ${BACKUP_PATH?:Please set the BACKUP_PATH environment variable.}:/backup
networks:
- nginx_network
environment:
- DJANGO_SETTINGS_MODULE=config.settings.container
- DJANGO_DEBUG=${DJANGO_DEBUG}
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY:?Please set the DJANGO_SECRET_KEY environment variable.}
- DJANGO_CSRF_TRUSTED_ORIGINS=${DJANGO_CSRF_TRUSTED_ORIGINS:?Please set the DJANGO_CSRF_TRUSTED_ORIGINS environment variable.}
frontend:
container_name: frontend-${ENVIRONMENT_NAME}
build:
context: ./
dockerfile: ./docker/frontend/Dockerfile
image: nextjs:${ENVIRONMENT_NAME}
networks:
- nginx_network
environment:
- REST_API=http://djangoapp:8000
nginx-unprivileged:
container_name: nginx-${ENVIRONMENT_NAME}
image: nginxinc/nginx-unprivileged:alpine
ports:
- 8080
volumes:
- nginx_config_volume:/etc/nginx/conf.d
- nginx_extras_volume:/etc/nginx/conf.d/extras
- static_volume:/cpmonitor/static
- ${IMAGES_PATH}:/cpmonitor/images
depends_on:
- djangoapp
networks:
- nginx_network
dbeaver:
build: ./docker/dbeaver
container_name: dbeaver-${ENVIRONMENT_NAME}
image: klimaschutzmonitor-dbeaver:${ENVIRONMENT_NAME}
volumes:
- ${DB_PATH?:Please set the DB_PATH environment variable.}:/db
networks:
- nginx_network
ports:
- 8978
environment:
CB_SERVER_NAME: CloudBeaver CE Server
CB_ADMIN_NAME: ${CB_ADMIN_NAME}
CB_ADMIN_PASSWORD: ${CB_ADMIN_PASSWORD}
depends_on:
- djangoapp
networks:
nginx_network:
name: ${ENVIRONMENT_NAME}_nginx_network
external: true
volumes:
# just declare the volumes so nginx and django can share them
nginx_config_volume:
nginx_extras_volume:
static_volume: