-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
128 lines (117 loc) · 2.95 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# This docker-compose configuration is aimed at DEVELOPMENT. It is not suitable
# for production at all.
version: '3.9'
services:
# backend
db:
image: postgres:11
environment:
- POSTGRES_HOST_AUTH_METHOD=trust # do not use this in production!
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:5-alpine
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.2
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- es_data:/usr/share/elasticsearch/data
# expose to the host machine so that we can use docker ES for development
ports:
- 9200:9200
- 9300:9300
backend: &backend-default
image: scrumteamzgw/zaakafhandelcomponent:${TAG:-latest}
build:
context: ./backend
args:
- RELEASE=${TAG:-compose-latest}
- COMMIT_HASH=${COMMIT_HASH:-HEAD}
environment:
- DJANGO_SETTINGS_MODULE=zac.conf.docker
- SECRET_KEY=${SECRET_KEY:-changeme}
- IS_HTTPS=0
- ALLOWED_HOSTS=localhost
- REDIS_HOST=redis
- ES_HOST=elasticsearch
- USE_REDIS_CACHE=True
- CACHE_DEFAULT=redis:6379/0
- CACHE_AXES=redis:6379/0
- CACHE_OAS=redis:6379/1
- CACHE_SESSIONS=redis:6379/1
- CORS_HEADERS_ENABLED=True
- DEBUG=True
# expose backend port for frontend development
ports:
- 8000:8000
depends_on:
- db
- redis
- elasticsearch
backend-dev:
<<: *backend-default
environment:
- AUTORELOAD=true
- DJANGO_SETTINGS_MODULE=zac.conf.docker
- SECRET_KEY=${SECRET_KEY:-changeme}
- IS_HTTPS=0
- ALLOWED_HOSTS=localhost
- REDIS_HOST=redis
- ES_HOST=elasticsearch
- USE_REDIS_CACHE=True
- CACHE_DEFAULT=redis:6379/0
- CACHE_AXES=redis:6379/0
- CACHE_OAS=redis:6379/1
- CACHE_SESSIONS=redis:6379/1
- CORS_HEADERS_ENABLED=True
- DEBUG=True
volumes:
- ./backend:/app
# frontend
frontend:
image: scrumteamzgw/zac-ui:${TAG:-latest}
build: ./frontend/zac-ui
depends_on:
- backend
frontend-dev:
build:
context: ./frontend/zac-ui
dockerfile: Dockerfile-dev
args:
- NODE_VERSION=${NODE_VERSION:-16}
environment:
- SOURCEMAP=false
volumes:
- ./frontend/zac-ui:/app
# ingress
ingress: &ingress-default
build: ./ingress
ports:
- 8080:8080
depends_on:
- backend
- frontend
ingress-dev:
<<: *ingress-default
environment:
- FRONTEND_HOST=frontend-dev
- FRONTEND_PORT=4200
- FRONTEND_PATH=
depends_on:
- backend
- frontend-dev
ingress-dev-fullstack:
<<: *ingress-default
environment:
- BACKEND_HOST=backend-dev
- FRONTEND_HOST=frontend-dev
- FRONTEND_PORT=4200
- FRONTEND_PATH=
depends_on:
- backend-dev
- frontend-dev
volumes:
postgres_data:
es_data: