-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (38 loc) · 1.07 KB
/
docker-compose.yml
File metadata and controls
39 lines (38 loc) · 1.07 KB
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
version: '2'
services:
db:
image: mysql:5.7.17
restart: always
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0
volumes:
- mysql_volume:/var/lib/mysql
ports:
- "3306:3306"
env_file: .env
environment:
MYSQL_ROOT_PASSWORD: ${RDS_USER_ROOT_PASSWORD}
MYSQL_DATABASE: ${RDS_DB_NAME}
MYSQL_USER: ${RDS_USERNAME}
MYSQL_PASSWORD: ${RDS_PASSWORD}
app:
build: .
env_file: .env
command: >
bash -c "rm -f tmp/pids/server.pid &&
bundle check || bundle install &&
bundle exec rails db:migrate RAILS_ENV=production &&
bundle exec rails db:seed &&
bundle exec rails assets:precompile &&
bundle exec rails s -p 3000 -b '0.0.0.0' -e production"
environment:
SERVER_ENV: production
RAILS_ENV: production
depends_on:
- db
volumes:
- .:/usr/src/editores
ports:
- "3000:3000"
volumes:
gems_volume:
mysql_volume: