-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.dev.yml
114 lines (109 loc) · 3.28 KB
/
docker-compose.dev.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
version: '3.7'
services:
client:
image: ${APP_NAME}-client
container_name: ${APP_NAME}-client
environment:
- REACT_APP_API_URL=http://localhost:8080
- DANGEROUSLY_DISABLE_HOST_CHECK=true
build:
context: ./client
dockerfile: Dockerfile.dev
ports:
- 4000:4000
volumes:
- ./client:/client # Use client dir in host for hot reloading
- ./client/node_modules:/client/node_modules # Use node_modules in container
depends_on:
- server
networks:
- network
server:
image: node:14-alpine
container_name: ${APP_NAME}-server
build:
context: ./server
dockerfile: Dockerfile.dev
command: npm run watch
environment:
- APP_ENV=local
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- MONGO_HOST=mongodb
- MONGO_DB=${MONGO_DB}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- VERSION=${COMMIT_SHA}
- KEYCLOAK_REALM=${KEYCLOAK_REALM}
- KEYCLOAK_AUTH_URL=${KEYCLOAK_AUTH_URL}
- KEYCLOAK_UMS_API_URL=${KEYCLOAK_UMS_API_URL}
- KEYCLOAK_API_CLIENTID=${KEYCLOAK_API_CLIENTID}
- KEYCLOAK_API_SECRET=${KEYCLOAK_API_SECRET}
- KEYCLOAK_FE_CLIENTID=${KEYCLOAK_FE_CLIENTID}
- KEYCLOAK_SA_USERNAME=${KEYCLOAK_SA_USERNAME}
- KEYCLOAK_SA_PASSWORD=${KEYCLOAK_SA_PASSWORD}
- CHES_CLIENT_ID=${CHES_CLIENT_ID}
- CHES_CLIENT_SECRET=${CHES_CLIENT_SECRET}
- CHES_HOST=${CHES_HOST}
- AUTH_URL=${AUTH_URL}
- CLIENT_URL=${CLIENT_URL}
- KC_TEST_SUPER_USER_PWD=${KC_TEST_SUPER_USER_PWD}
- KC_TEST_EMPLOYER_PWD=${KC_TEST_EMPLOYER_PWD}
- KC_TEST_HA_PWD=${KC_TEST_HA_PWD}
- SERVICE_CONFIG=${SERVICE_CONFIG}
- FEATURE_KEYCLOAK_MIGRATION=${FEATURE_KEYCLOAK_MIGRATION}
- REACT_APP_GOOGLE_SITE_VERIFICATION=${REACT_APP_GOOGLE_SITE_VERIFICATION}
- COLLECTOR_VARIABLE=${COLLECTOR_VARIABLE}
expose:
- '8080'
ports:
- '8080:8080'
volumes:
- ./server:/server # Use server dir in host for hot reloading
- ./server/node_modules:/server/node_modules
depends_on:
- postgres
- mongodb
networks:
- network
postgres:
image: postgis/postgis:13-3.1-alpine
container_name: ${APP_NAME}-postgres
restart: always
expose:
- '5432'
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- ./.pgdata:/var/lib/postgresql/data
- ./.docker/postgres/sql-init:/docker-entrypoint-initdb.d
ports:
- '5432:5432'
networks:
- network
mongodb:
container_name: ${APP_NAME}-mongodb
image: mongo:3.6-xenial
restart: always
expose:
- '27017'
ports:
- '27017:27017'
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
- MONGO_INITDB_DATABASE=${MONGO_DB}
volumes:
- ./.docker/mongo/databaseInit:/docker-entrypoint-initdb.d
- ./.mongo-data/configdb:/data/configdb
- ./.mongo-data/logs:/data/db
networks:
- network
networks:
network:
name: ${APP_NAME}-network
driver: bridge