forked from chiditarod/dogtag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (70 loc) · 1.59 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
version: "3.4"
x-default: &default
build: .
depends_on:
- redis
- db
networks:
- web
volumes:
- bundle_cache:/bundle_cache
- .:/app
services:
web:
<<: *default
environment:
- DATABASE_URL=postgres://postgres@db:5432
- REDIS_URL=redis://redis:6379/0
# read stripe secrets from local env (or .env file)
- STRIPE_PUBLISHABLE_KEY="${STRIPE_PUBLISHABLE_KEY}"
- STRIPE_SECRET_KEY="${STRIPE_SECRET_KEY}"
# TODO: SMTP_HOST might not be needed here
- SMTP_HOST=mailcatcher
ports:
- "3000:3000"
worker:
<<: *default
environment:
- DATABASE_URL=postgres://postgres@db:5432
- REDIS_URL=redis://redis:6379/0
- SMTP_HOST=mailcatcher
- SMTP_PORT=1025
command: bundle exec sidekiq -t 10 -C ./config/sidekiq.yml
db:
image: postgres:14.7-alpine
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_HOST_AUTH_METHOD=trust
networks:
- web
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data/pgdata
- ./docker/init-postgres.sh:/docker-entrypoint-initdb.d/init-postgres.sh
redis:
image: redis:5-alpine
command: redis-server --appendonly yes
networks:
- web
ports:
- "6379:6379"
volumes:
- redis_cache:/data
mailcatcher:
build:
context: .
dockerfile: docker/Dockerfile.mailcatcher
networks:
- web
volumes:
- bundle_cache:/bundle_cache
ports:
- "1025:1025"
- "1080:1080"
networks:
web:
volumes:
bundle_cache:
redis_cache:
pgdata: