forked from timhabermaas/cubemania
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (60 loc) · 1.18 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
61
version: '2'
services:
db:
image: postgres:9.5.3
ports:
- "7070:5432"
volumes:
- postgres-volume:/var/lib/postgresql/data
nginx:
restart: always
build:
context: .
dockerfile: nginx/Dockerfile
links:
- web
ports:
- "443:443"
- "8080:80"
volumes:
- ./public:/home/assets
- ~/Documents/certs:/cert
jobs:
build: .
command: ./start_jobs.sh
volumes:
- .:/cubemania
links:
- db
environment:
RAILS_ENV: production
DATABASE_URL: postgresql://postgres@db/cubemania_production
web:
build: .
command: bundle exec unicorn -p 3000 -c ./config/unicorn.rb
volumes:
- .:/cubemania
ports:
- "3000:3000"
links:
- db
- cache
depends_on:
- jobs
environment:
RAILS_ENV: production
DATABASE_URL: postgresql://postgres@db/cubemania_production
cache:
image: memcached:alpine
command: memcached -m 64
backup:
build:
context: backup
dockerfile: Dockerfile
volumes:
- ~/.tarsnap:/root/keys
- ~/.tarsnap/cache:/root/tarsnap-cache
links:
- db
volumes:
postgres-volume: