-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-oauth2.dev.yml
84 lines (81 loc) · 2.51 KB
/
docker-compose-oauth2.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
version: "3.3"
volumes:
db_storage: {}
redis_data:
driver: local
services:
nginx:
image: nginx:1.20
container_name: ria_dev_nginx
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
volumes:
- ./etc/assets/wait-for-it.sh:/wait-for-it.sh
- ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./etc/nginx/conf.d:/etc/nginx/conf.d
- ./etc/nginx/ssl:/etc/nginx/ssl
entrypoint:
- bash
- -c
- |
/wait-for-it.sh -t 0 database:3306
/wait-for-it.sh -t 0 ria:3000
nginx-debug -g 'daemon off;'
ria:
build:
context: ./
dockerfile: Dockerfile.dev
image: ria_dev:latest
container_name: ria_dev
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./:/app
- /app/node_modules
depends_on:
- database
- redis
command: ["./etc/assets/wait-for-it.sh", "database:3306", "--", "npm", "start"]
environment:
- DEBUG=$DEBUG
- SECRET=$SECRET
- DATABASE_PORT=$DATABASE_PORT
- DATABASE_HOST=$DATABASE_HOST
- DATABASE_USER=$DATABASE_USER
- DATABASE_PASSWORD=$DATABASE_PASSWORD
- DATABASE_NAME=$DATABASE_NAME
- DATABASE_DIALECT=$DATABASE_DIALECT
- SITE=$SITE
- OAUTH2_LOGIN_PATH=$OAUTH2_LOGIN_PATH
- GSIS_SITE=$GSIS_SITE
- CLIENT_ID=$CLIENT_ID
- CLIENT_SECRET=$CLIENT_SECRET
- GSIS_GOV=$GSIS_GOV
database:
image: mysql:8
ports:
- '127.0.0.1:2306:3306'
expose:
- '3306'
container_name: ria_db
volumes:
- db_storage:/var/lib/mysql
- ./init:/docker-entrypoint-initdb.d
- ./etc/assets/custom.cnf:/etc/mysql/conf.d/custom.cnf
environment:
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
- MYSQL_USER=$DATABASE_USER
- MYSQL_PASSWORD=$DATABASE_PASSWORD
- MYSQL_DATABASE=$DATABASE_NAME
redis:
image: redis:6-bullseye
container_name: ria_redis
command:
- redis-server
- /etc/redis/redis.conf
ports:
- '127.0.0.1:6379:6379'
volumes:
- ./etc/redis/redis.conf:/etc/redis/redis.conf
- redis_data:/data