forked from alphagov/e-petitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (75 loc) · 1.57 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
x-application: &application
image: e-petitions/ruby
build: docker/ruby
volumes:
- .:/app
- bundle:/bundle
- cache:/cache
- node_modules:/app/node_modules
tmpfs:
- /tmp/pids/
depends_on:
- postgres
- mailcatcher
- memcached
x-environment: &environment
DATABASE_URL: "postgres://postgres:ZW4IvOPrXcbp2hyp@postgres:5432"
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: "true"
MEMCACHE_SERVERS: "memcached:11211"
SMTP_HOST: "mailcatcher"
SMTP_PORT: "1025"
SPROCKETS_CACHE: "/cache"
PIDFILE: "/tmp/pids/server.pid"
services:
postgres:
image: postgres:12
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=ZW4IvOPrXcbp2hyp
- POSTGRES_DB=postgres
ports:
- "127.0.0.1:5432:5432"
volumes:
- db:/var/lib/postgresql/data
mailcatcher:
image: e-petitions/mailcatcher
build: docker/mailcatcher
expose:
- "1025"
ports:
- "127.0.0.1:1080:1080"
memcached:
image: memcached:1.5
expose:
- "11121"
web:
<<: *application
environment:
<<: *environment
command: [
"rails", "server",
"-b", "0.0.0.0",
"-p", "3000"
]
ports:
- "127.0.0.1:3000:3000"
stdin_open: true
tty: true
worker:
<<: *application
environment:
<<: *environment
MIN_PRIORITY: "10"
command: [ "rake", "jobs:work" ]
counter:
<<: *application
environment:
<<: *environment
MAX_PRIORITY: "5"
command: [ "rake", "jobs:work" ]
volumes:
bundle:
db:
cache:
node_modules: