-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (59 loc) · 1.24 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
version: '3'
services:
# Postgres
postgres:
image: postgres
volumes:
- ./tmp/postgres:/var/lib/postgresql/data
ports:
- 5432:5432
restart: always
# Redis
redis:
image: 'redis:4.0-alpine'
command: redis-server --requirepass secret
volumes:
- ./tmp/redis:/data
restart: always
# Web
web:
build:
context: ./
dockerfile: ./docker/Dockerfile.web
command: bundle exec rails s -p 3000 -b '0.0.0.0'
# command: tail -f /dev/null # Keeps container running
volumes:
- ./:/mailmate-web
- ./tmp/bundle:/bundle # Gem cache
ports:
- 3000:3000 # Server
depends_on:
- postgres
- redis
links:
- postgres
- redis
restart: always
stdin_open: true # Allows attaching for byebug
tty: true # Allows attaching for byebug
# Worker
worker:
build:
context: ./
dockerfile: ./docker/Dockerfile.web
command: sidekiq -C config/sidekiq.yml
volumes:
- ./:/mailmate-web
- ./tmp/bundle:/bundle # Gem cache
depends_on:
- postgres
- redis
links:
- postgres
- redis
restart: always
# Mailcatcher
mailcatcher:
image: schickling/mailcatcher
ports:
- 1080:1080