-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathdocker-compose.yml
139 lines (130 loc) · 2.71 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
x-application: &application
image: e-petitions/ruby
build: docker/ruby
volumes:
- type: bind
source: .
target: /app
- type: volume
source: bundle
target: /bundle
- type: volume
source: cache
target: /cache
- type: volume
source: node_modules
target: /app/node_modules
tmpfs:
- /tmp/pids/
depends_on:
- dnsmasq
- postgres
- mailcatcher
dns:
- 172.24.99.53
x-environment: &environment
DATABASE_URL: "postgres://postgres:ZW4IvOPrXcbp2hyp@postgres:5432"
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: "true"
SPROCKETS_CACHE: "/cache"
PIDFILE: "/tmp/pids/server.pid"
services:
dnsmasq:
image: e-petitions/dnsmasq
build: docker/dnsmasq
volumes:
- type: bind
source: docker/dnsmasq/dnsmasq.conf
target: /etc/dnsmasq.conf
cap_add:
- NET_ADMIN
networks:
default:
ipv4_address: 172.24.99.53
postgres:
image: postgres:16
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=ZW4IvOPrXcbp2hyp
- POSTGRES_DB=postgres
ports:
- "127.0.0.1:5432:5432"
volumes:
- type: volume
source: db
target: /var/lib/postgresql/data
mailcatcher:
image: e-petitions/mailcatcher
build: docker/mailcatcher
expose:
- "1025"
ports:
- "127.0.0.1:1080:1080"
networks:
default:
ipv4_address: 172.24.99.30
web:
<<: *application
environment:
<<: *environment
command: [
"foreman", "start",
"-f", "Procfile.dev"
]
ports:
- "127.0.0.1:3000:3000"
networks:
default:
ipv4_address: 172.24.99.31
stdin_open: true
tty: true
init: true
console:
<<: *application
environment:
<<: *environment
command: ["/bin/bash"]
profiles:
- console
stdin_open: true
tty: true
dns:
- 172.24.99.53
e2e:
<<: *application
environment:
<<: *environment
DISABLE_FORCE_SSL: "true"
RAILS_ENV: "production"
RAILS_SERVE_STATIC_FILES: "true"
SECRET_KEY_BASE: "6a5e319d068ceb629ce3cf4683b296a9"
STORAGE_ADAPTER: "test"
WEB_CONCURRENCY: "0"
WEB_CONCURRENCY_MIN_THREADS: "5"
WEB_CONCURRENCY_MAX_THREADS: "5"
command: [
"foreman", "start",
"-f", "Procfile.dev"
]
ports:
- "127.0.0.1:3000:3000"
networks:
default:
ipv4_address: 172.24.99.31
profiles:
- e2e
stdin_open: true
tty: true
init: true
networks:
default:
ipam:
config:
- subnet: 172.24.0.0/16
ip_range: 172.24.99.0/24
gateway: 172.24.99.254
volumes:
bundle:
db:
cache:
node_modules: