-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
50 lines (48 loc) · 1.61 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
# rails _5.2.4.3_ new .qa_server_app --database=mysql
# rm .qa_server_app/config/database.yml # use ENV for database configuration
# docker-compose build
# docker-compose up app
version: '3.2'
services:
app: &app
build:
context: .
image: ld4p/qa_server:v1
container_name: ld4p-qa_server-app
stdin_open: true
tty: true
user: root
env_file:
- .env
volumes:
# - .:/app/ld4p/qa_server-webapp # use for debugging
- app_src:/app/ld4p/qa_server-webapp # use when not debugging
# - ${AUTHORITIES_PATH}:/app/ld4p/qa_server-webapp/config/authorities # use to setup path to authorities outside app
- authorities:/app/ld4p/qa_server-webapp/config/authorities # use for commits with to allow cci to run
- rails-public:/app/ld4p/qa_server-webapp/public
- rails-tmp:/app/ld4p/qa_server-webapp/tmp
- gems:/usr/local/bundle
ports:
- "3000:3000"
depends_on:
- mysql
mysql:
image: mariadb:10.6 # Not specifying version causes a runtime error: "undefined method `encoding' for -0.0:BigDecimal"
restart: always
container_name: ld4p-qa_server-mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE_NAME_PREFIX}_development
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
ports:
- "${MYSQL_PORT}:3306"
volumes:
- db-mysql-data:/var/lib/mysql/data
volumes:
app_src: # comment out when debugging and using . volume for qa_server-webapp
authorities: # comment out when running locally
db-mysql-data:
gems:
rails-public:
rails-tmp: