forked from OpenTree-Education/rhizone-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (68 loc) · 1.53 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
services:
api:
build: ./api/
depends_on:
- mysql
- redis
environment:
- API_HOST=0.0.0.0
- GITHUB_CLIENT_ID
- GITHUB_CLIENT_SECRET
- GITHUB_REDIRECT_URI
- MYSQL_DATABASE
- MYSQL_HOST=mysql
- MYSQL_PASSWORD
- MYSQL_USER
- NODE_ENV=development
- REDIS_HOST=redis
- SESSION_SECRET
- WEBAPP_ORIGIN
mysql:
command: --skip-name-resolve
environment:
- MYSQL_DATABASE
- MYSQL_PASSWORD
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_USER
image: mysql:8.0
ports:
- "3306:3306"
healthcheck:
test: mysql ${MYSQL_DATABASE} --user=${MYSQL_USER} --password='${MYSQL_PASSWORD}' --silent --execute "SELECT 1;"
interval: 3s
timeout: 3s
start_period: 60s
retries: 180
flyway:
build: ./db/
command: migrate
depends_on:
mysql:
condition: service_healthy
environment:
- FLYWAY_CONNECT_RETRIES=10
- FLYWAY_PASSWORD=${MYSQL_PASSWORD}
- FLYWAY_URL=jdbc:mysql://mysql/${MYSQL_DATABASE}
- FLYWAY_USER=${MYSQL_USER}
nginx:
build:
context: ./nginx/
args:
- BUILD_ENV=development
depends_on:
- api
- webapp
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "80:80"
redis:
image: redis:7-alpine
ports:
- "6379:6379"
webapp:
build:
context: ./webapp/
args:
- REACT_APP_API_ORIGIN=http://api.rhi.zone-development
- REACT_APP_ROLLBAR_ACCESS_TOKEN=