-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (33 loc) · 1.01 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
# https://phraseapp.com/blog/posts/unifying-rails-environments-docker-compose/
version: '3'
services:
app: &app
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/app
# use tmpfs for tmp and log for performance and to allow
# multiple builds in parallel. Both directories are mounted
# into the image AFTER the working directory is mounted.
tmpfs: ["/app/tmp", "/app/log"]
environment:
RAILS_ENV: "development"
#DATABASE_URL: "sqlite3::memory:"
#DATABASE_URL: "mysql2://mysql/reality?local_infile=true"
# depends_on:
# - mysql
command: ["bundle", "exec", "./build/validate-migrated.sh && rails server -b 0.0.0.0"]
ports: ["3000:3000"]
# mysql: &mysql
# image: mysql:5.6.35
# ports: ["3306"]
# environment:
# MYSQL_ALLOW_EMPTY_PASSWORD: "true"
# MYSQL_DATABASE: "reality"
#
# healthcheck:
# test: ["CMD", "mysql", "-u", "root", "-e", "select 1"]
# interval: 1s
# timeout: 1s
# retries: 300