-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
115 lines (107 loc) · 2.44 KB
/
docker-compose.yaml
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
version: "3.7"
services:
redis:
image: redis:7.0-alpine
restart: always
ports:
- '6379:6379'
volumes:
- redis:/data
# An UI to visualize the task queues
asynq-ui:
image: hibiken/asynqmon
ports:
- '4000:8080'
environment:
REDIS_ADDR: redis:6379
db:
image: 'postgres:15-alpine'
ports:
- "5432:5432"
deploy:
mode: replicated
replicas: 1
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: secret
volumes:
- postgres-db:/var/lib/postgresql/data/
db-migrate:
depends_on:
- db
build:
context: .
dockerfile: Dockerfile.migrations
environment:
DB_URL: postgres://postgres:secret@db:5432/postgres?sslmode=disable
mailhog:
image: mailhog/mailhog
logging:
driver: 'none' # disable saving logs
ports:
- 1025:1025 # smtp server
- 8025:8025 # web ui
app:
depends_on:
- db
- redis
build:
context: .
dockerfile: Dockerfile.api
restart: always
ports:
- "3000:3000"
- "9000:9000"
- "9001:9001"
environment:
DB_URL: postgres://postgres:secret@db:5432/postgres?sslmode=disable
PORT: 3000
ENV: DEV
GRPC_PORT: 9000
GRPC_GATEWAY_PORT: 9001
DB_DRIVER: postgres
TOKEN_DURATION: 2m
TOKEN_SECRET: YELLOW SUBMARINE, BLACK WIZARDRY
REFRESH_TOKEN_DURATION: 15m
REFRESH_TOKEN_SECRET: YELLOW SUBMARINE, BLACK WIZARDRY
# SMTP
SMTP_HOST: mailhog
SMTP_PORT: 1025
SMTP_USER: bogo
SMTP_PASS: pass
SMTP_FROM: [email protected]
# REDIS
REDIS: redis:6379
redis-workers:
depends_on:
- db
- redis
build:
context: .
dockerfile: Dockerfile.workers
restart: always
environment:
DB_URL: postgres://postgres:secret@db:5432/postgres?sslmode=disable
PORT: 3000
ENV: DEV
GRPC_PORT: 9000
GRPC_GATEWAY_PORT: 9001
DB_DRIVER: postgres
TOKEN_DURATION: 2m
TOKEN_SECRET: YELLOW SUBMARINE, BLACK WIZARDRY
REFRESH_TOKEN_DURATION: 15m
REFRESH_TOKEN_SECRET: YELLOW SUBMARINE, BLACK WIZARDRY
# SMTP
SMTP_HOST: mailhog
ENCRYTION: none
SMTP_PORT: 1025
SMTP_USER: ""
SMTP_PASS: pass
SMTP_FROM: [email protected]
# REDIS
REDIS: redis:6379
volumes:
postgres-db:
driver: local
redis:
driver: local