-
Notifications
You must be signed in to change notification settings - Fork 3
/
example-compose.yml
47 lines (45 loc) · 1 KB
/
example-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
version: '2'
services:
app:
image: krismichalski/rails:latest
environment:
- RAILS_VERSION=5.0.0
- APP_NAME=example
- DB_HOST=db # name of service below
- DB_ADAPTER=postgresql
# - DB_ADAPTER=mysql2
# - DB_ADAPTER=sqlite3
- DB_USER=postgres
# - DB_USER=root # for mysql
# - DB_PASS=password
# - RAILS_NEW_ARGS='--api'
# - LOCAL_USER_ID=9999
volumes:
- ./:/home/app/webapp
- bundle_data:/home/app/bundle
depends_on:
- db
ports:
- 3000:3000
# for pry
tty: true
stdin_open: true
# not needed when sqlite3
db:
image: postgres:9.5
# image: mariadb:10.1
# image: mysql:5.7
volumes:
- db_data:/var/lib/postgresql
# - db_data:/var/lib/mysql
# environment:
# - MYSQL_ROOT_PASSWORD=password
# or empty root password
# - MYSQL_ALLOW_EMPTY_PASSWORD=yes
logging:
driver: none
volumes:
bundle_data:
driver: local
db_data:
driver: local