forked from adamcooke/staytus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (58 loc) · 1.82 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
51
52
53
54
55
56
57
58
59
60
# see: https://docs.docker.com/compose/rails/
version: '3'
services:
db:
image: mysql:5.6.47
restart: always
ports:
- 3306:3306
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- db_data:/var/lib/mysql
web:
build: .
environment:
FORCE_SSL: ${STAYTUS_FORCE_SSL}
RAILS_ENV: ${STAYTUS_RAILS_ENV}
DATABASE_URL: ${STAYTUS_DATABASE_URL}
STAYTUS_SMTP_HOSTNAME: ${STAYTUS_SMTP_HOSTNAME}
STAYTUS_SMTP_PASSWORD: ${STAYTUS_SMTP_PASSWORD}
STAYTUS_SMTP_PORT: ${STAYTUS_SMTP_PORT}
STAYTUS_SMTP_USERNAME: ${STAYTUS_SMTP_USERNAME}
STAYTUS_THEME: ${STAYTUS_THEME}
SECRET_KEY_BASE: ${STAYTUS_SECRET_KEY_BASE}
RUN_MIGRATION: ${STAYTUS_RUN_MIGRATION}
RUN_ASSET_PRECOMPILE: ${STAYTUS_RUN_ASSET_PRECOMPILE}
command: bash -c "bundle exec rake db:create; bundle exec rake db:migrate; bundle exec rake assets:precompile; bundle exec puma -C config/puma.rb"
volumes:
- .:/myapp
ports:
- "8787:8787"
depends_on:
- db
ssh:
build:
context: .
dockerfile: Dockerfile.ssh
environment:
FORCE_SSL: ${STAYTUS_FORCE_SSL}
RAILS_ENV: ${STAYTUS_RAILS_ENV}
DATABASE_URL: ${STAYTUS_DATABASE_URL}
STAYTUS_SMTP_HOSTNAME: ${STAYTUS_SMTP_HOSTNAME}
STAYTUS_SMTP_PASSWORD: ${STAYTUS_SMTP_PASSWORD}
STAYTUS_SMTP_PORT: ${STAYTUS_SMTP_PORT}
STAYTUS_SMTP_USERNAME: ${STAYTUS_SMTP_USERNAME}
STAYTUS_THEME: ${STAYTUS_THEME}
SECRET_KEY_BASE: ${STAYTUS_SECRET_KEY_BASE}
RUN_MIGRATION: ${STAYTUS_RUN_MIGRATION}
RUN_ASSET_PRECOMPILE: ${STAYTUS_RUN_ASSET_PRECOMPILE}
command: bash -c "bundle exec rake db:create; bundle exec rake db:migrate; /usr/sbin/sshd -D"
volumes:
- .:/myapp
ports:
- "2222:22"
depends_on:
- db
volumes:
db_data: