-
Notifications
You must be signed in to change notification settings - Fork 177
/
docker-compose.yml
92 lines (84 loc) · 1.95 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
version: '3'
services:
web:
build:
context: .
dockerfile: dockerfiles/web
volumes:
- .:/app:cached
ports:
- "3000:3000"
links:
- db
- redis
- smtp
db:
# Use same version of postgres as we're currently using elsewhere
# TODO: Upgrade to postgres 13 which we are now using in production
image: postgres:11.8
environment:
- POSTGRES_PASSWORD=cuttlefish
ports:
- "5432"
volumes:
- postgres_data:/var/lib/postgresql/data
smtp:
build:
context: .
dockerfile: dockerfiles/web
command: bundle exec rake cuttlefish:smtp
volumes:
- .:/app:cached
# This needs to share the directory containing email content between
# smtp server and workers
- ./tmp/emails:/tmp:cached
ports:
- "2525:2525"
redis:
image: redis:4.0
worker:
build:
context: .
dockerfile: dockerfiles/web
command: bundle exec sidekiq
volumes:
- .:/app:cached
# This needs to share the directory containing email content between
# smtp server and workers
- ./tmp/emails:/tmp:cached
links:
- db
- redis
- postfix
postfix:
image: juanluisbaptiste/postfix
environment:
- SMTP_SERVER=mailcatcher
- SMTP_PORT=1025
# The username and password are actually ignore by mailcatcher but need
# to be set to keep this container happy
- SMTP_PASSWORD=XXXXXXXX
- SERVER_HOSTNAME=cuttlefish.io
volumes:
- ./postfix_log:/var/log:cached
links:
- mailcatcher
mailcatcher:
build:
context: .
dockerfile: dockerfiles/mailcatcher
ports:
- "1080:1080"
log:
build:
context: .
dockerfile: dockerfiles/web
command: bundle exec rake cuttlefish:log
volumes:
- .:/app:cached
- ./postfix_log:/var/log:cached
links:
- db
volumes:
postgres_data: