-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml.example
78 lines (74 loc) · 2.44 KB
/
docker-compose.yml.example
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Note: data containers are used here mainly for developing with
# MacOS. Docker performance is too slow to run rails when the gems
# and/or database is stored on host-mounted volumes.
#
# Create data volumes like this:
# docker run -v /var/lib/postgresql/data --name pgdata postgres:11.2 echo 'Postgres data'
# docker run -v /usr/local/rvm/gems -v /home/app/workshops/vendor/cache \
# --name rubygems "phusion/passenger-ruby26:1.0.10" echo 'Ruby gems'
#
# Be sure to update all of the example passwords and keys with secure ones!
# Generate secure strings using:
# < /dev/urandom LC_CTYPE=C tr -dc _A-Z-a-z-0-9 | head -c${1:-64};echo
version: '3.8'
services:
db:
image: postgres:9.6.5
container_name: wsdb
volumes:
- ./db/pg-init:/docker-entrypoint-initdb.d
volumes:
- pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=zzzzzzzzzzzzzzzz
- PSQL_TRUST_LOCALNET=true
- DB_PORT=5433
- DB_NAME=workshops_production,workshops_development,workshops_test
- DB_USER=wsuser
- DB_PASS=yyyyyyyyyyyyyyy
web:
build: .
container_name: ws
command: /sbin/entrypoint.sh
ports:
- '80:80'
volumes:
- ./:/home/app/workshops
- ./entrypoint.sh:/sbin/entrypoint.sh
- /Users/brent/rails/ssh-keys:/root/.ssh
- rubygems:/usr/local/rvm/gems
- rubygems:/home/app/workshops/vendor/cache
links:
- db
environment:
- DB_USER=wsuser
- DB_PASS=yyyyyyyyyyyyyyy
- RAILS_ENV=development
- YARN_ENV=development
- RAILS_SERVE_STATIC_FILES=true
- SECRET_KEY_BASE=xxxxxxxxxxx
- SECRET_TOKEN=xxxxxxxxxxx
- DEVISE_SECRET_KEY=xxxxxxxxxxx
- DEVISE_JWT_SECRET_KEY=xxxxxxxxxxx
- DEVISE_PEPPER=xxxxxxxxxxx
- DEVISE_EMAIL=webmaster@example.com
- LECTURES_API_KEY=xxxxxxxxxxx
- APPLICATION_HOST=localhost
- APPLICATION_PROTOCOL=http
- EMAIL_SERVER=mail.example.com
- EMAIL_PORT=587
- EMAIL_STARTTLS=true
- MAILGUN_API_KEY=xxxxxxxxxxx
- MAILGUN_EMAIL_DOMAIN=staging.example.com
- CORS_HOSTS="'https://locomotive.works', 'http://locomotive.works',
'https://www.example.com', 'http://www.example.com'"
# adding labels allows pruning of unused system volumes with:
# docker volume prune --filter 'label!=workshops_volume'"
volumes:
pgdata:
labels:
workshops_volume: ""
rubygems:
labels:
workshops_volume: ""