-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (38 loc) · 1.09 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
version: '2'
volumes:
db_storage:
driver: local
services:
db:
image: mariadb:10.2
restart: always
volumes:
- db_storage:/var/lib/mysql
extends:
service: base
file: docker-compose-base.yml
rmt:
build: .
environment:
- MYSQL_HOST=db
- SECRET_KEY_BASE=8ea53ad3bc6c03923e376c8bdd85059c1885524947a7efe53d5e9c9d4e39861106ffd6a2ece82b803072ed701e6c960bade91644979e679416c5f255007237ae
- SCC_USERNAME=${SCC_USERNAME}
- SCC_PASSWORD=${SCC_PASSWORD}
volumes:
- ./public:/srv/www/repo/public/
depends_on:
- db
extends:
service: base
file: docker-compose-base.yml
command: /bin/bash -c 'bundle.ruby2.5 exec rails db:migrate && bundle.ruby2.5 exec rails s -b rmt'
nginx:
image: nginx
volumes:
- ./public:/var/www/
- ./nginx/default.conf:/tmp/default.template
ports:
- "${EXTERNAL_PORT}:80"
depends_on:
- rmt
entrypoint: /bin/bash -c 'cat /tmp/default.template | sed "s/\\\$$server_port/$EXTERNAL_PORT/g" > /etc/nginx/conf.d/default.conf && nginx -g "daemon off;"'