forked from brentkearney/workshops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml.example
59 lines (57 loc) · 1.72 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
# 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 --name pgdata postgres:9.6.5 echo 'Postgres data'
# docker run -v /usr/local/rvm/gems -v /home/app/workshops/vendor/cache \
# --name rubygems "phusion/passenger-ruby25:1.0.0" echo 'Ruby gems'
#
# Generate secure strings for the keys, passwords and tokens using:
# < /dev/urandom LC_CTYPE=C tr -dc _A-Z-a-z-0-9 | head -c${1:-64};echo
db:
image: postgres:9.6.5
container_name: wsdb
volumes:
- ./db/pg-init:/docker-entrypoint-initdb.d
volumes_from:
- pgdata
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=xxxxxxxx
- DB_USER=db_username
- DB_PASS=yyyyyyyyyyyyy
- PSQL_TRUST_LOCALNET=true
- DB_PORT=5433
- DB_NAME=workshops_production,workshops_development,workshops_test
web:
build: .
container_name: ws
command: /sbin/entrypoint.sh
ports:
- '80:80'
volumes:
- ./:/home/app/workshops
volumes_from:
- rubygems
links:
- db
environment:
- DB_USER=db_username
- DB_PASS=
- RAILS_ENV=development
- RAILS_SERVE_STATIC_FILES=true
- SECRET_KEY_BASE=
- SECRET_TOKEN=
- DEVISE_SECRET_KEY=
- DEVISE_PEPPER=
- LECTURES_API_KEY=
- APPLICATION_HOST=workshops.example.com
- APPLICATION_PROTOCOL=http
- EMAIL_SERVER=mail.example.com
- EMAIL_PORT=25
- EMAIL_STARTTLS=true
- SPARKPOST_API_KEY=your_key
- CORS_HOSTS="'https://your.corssite1.com', 'https://your.corssite2.com'"