-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yaml
204 lines (190 loc) · 6.39 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
version: "3.9"
x-backend-common: &backend-common
build:
context: backend
dockerfile: development.Dockerfile
image: ghcr.io/th0th/poeticmetric/backend:development
environment: &backend-common-environment
CLICKHOUSE_DATABASE: ${CLICKHOUSE_DATABASE}
CLICKHOUSE_HOST: ${CLICKHOUSE_HOST}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
CLICKHOUSE_TCP_PORT: ${CLICKHOUSE_TCP_PORT}
CLICKHOUSE_USER: ${CLICKHOUSE_USER}
DEBUG: ${DEBUG}
FRONTEND_BASE_URL: ${FRONTEND_BASE_URL}
FRONTEND_DISABLE_MARKDOWN_CACHE: ${FRONTEND_DISABLE_MARKDOWN_CACHE}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
HOSTED: ${HOSTED}
MAIL_BLUSTER_API_KEY: ${MAIL_BLUSTER_API_KEY}
POSTGRES_DATABASE: ${POSTGRES_DATABASE}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_USER: ${POSTGRES_USER}
RABBITMQ_HOST: ${RABBITMQ_HOST}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
RABBITMQ_PORT: ${RABBITMQ_PORT}
RABBITMQ_USER: ${RABBITMQ_USER}
RABBITMQ_VHOST: ${RABBITMQ_VHOST}
REDIS_HOST: ${REDIS_HOST}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_PORT: ${REDIS_PORT}
REST_API_BASE_URL: ${REST_API_BASE_URL}
SENTRY_DSN: ${SENTRY_DSN}
SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT}
SMTP_FROM: ${SMTP_FROM}
SMTP_HOST: ${SMTP_HOST}
SMTP_PASSWORD: ${SMTP_PASSWORD}
SMTP_PORT: ${SMTP_PORT}
SMTP_USER: ${SMTP_USER}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
STRIPE_WEBHOOK_SIGNING_SECRET: ${STRIPE_WEBHOOK_SIGNING_SECRET}
WEBHOOK_URL: ${WEBHOOK_URL}
WORKER_COUNT: ${WORKER_COUNT}
restart: unless-stopped
volumes:
- ./backend/assets:/poeticmetric/assets
- ./backend/cmd:/poeticmetric/cmd
- ./backend/migrations:/poeticmetric/migrations
- ./backend/pkg:/poeticmetric/pkg
- ./backend/go.mod:/poeticmetric/go.mod
- ./backend/go.sum:/poeticmetric/go.sum
networks:
default:
name: ${COMPOSE_PROJECT_NAME}
volumes:
clickhouse:
frontend-next-build:
postgres:
redis:
services:
clickhouse:
environment:
CLICKHOUSE_DB: ${CLICKHOUSE_DATABASE}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
CLICKHOUSE_USER: ${CLICKHOUSE_USER}
image: clickhouse/clickhouse-server:latest-alpine
ports:
- "127.0.0.1:8123:8123"
volumes:
- clickhouse:/var/lib/clickhouse
frontend:
build:
context: frontend
dockerfile: development.Dockerfile
environment:
NEXT_PUBLIC_BASE_URL: ${FRONTEND_BASE_URL}
NEXT_PUBLIC_DISABLE_MARKDOWN_CACHE: ${FRONTEND_DISABLE_MARKDOWN_CACHE}
NEXT_PUBLIC_GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
NEXT_PUBLIC_HOSTED: ${HOSTED}
NEXT_PUBLIC_REST_API_BASE_URL: ${REST_API_BASE_URL}
NEXT_PUBLIC_SENTRY_DSN: ${SENTRY_DSN}
NEXT_PUBLIC_SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT}
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: ${STRIPE_PUBLISHABLE_KEY}
NEXT_PUBLIC_WEBHOOK_URL: ${WEBHOOK_URL}
NEXT_TELEMETRY_DISABLED: "1"
USE_POLLING: ${FRONTEND_USE_POLLING}
VIRTUAL_HOST: dev.poeticmetric.com
VIRTUAL_PORT: "3000"
image: ghcr.io/th0th/poeticmetric/frontend:development
volumes:
- frontend-next-build:/poeticmetric/.next
- ./frontend/@types:/poeticmetric/@types
- ./frontend/blog:/poeticmetric/blog
- ./frontend/components:/poeticmetric/components
- ./frontend/contexts:/poeticmetric/contexts
- ./frontend/docs:/poeticmetric/docs
- ./frontend/helpers:/poeticmetric/helpers
- ./frontend/hooks:/poeticmetric/hooks
- ./frontend/lib:/poeticmetric/lib
- ./frontend/pages:/poeticmetric/pages
- ./frontend/public:/poeticmetric/public
- ./frontend/styles:/poeticmetric/styles
- ./frontend/tests:/poeticmetric/tests
- ./frontend/next.config.js:/poeticmetric/next.config.js
- ./frontend/next-sitemap.config.js:/poeticmetric/next-sitemap.config.js
- ./frontend/package.json:/poeticmetric/package.json
- ./frontend/pnpm-lock.yaml:/poeticmetric/pnpm-lock.yaml
- ./frontend/playwright.config.ts:/poeticmetric/playwright.config.ts
- ./frontend/sentry.client.config.js:/poeticmetric/sentry.client.config.js
- ./frontend/sentry.server.config.js:/poeticmetric/sentry.server.config.js
- ./frontend/tsconfig.json:/poeticmetric/tsconfig.json
mailpit:
environment:
VIRTUAL_HOST: mailpit.dev.poeticmetric.com
VIRTUAL_PORT: "8025"
image: axllent/mailpit:v1.5.3
ports:
- "127.0.0.1:8025:8025"
nginx-proxy:
extra_hosts:
- "host.docker.internal:host-gateway"
image: jwilder/nginx-proxy:alpine
ports:
- "127.0.0.1:443:443"
- "127.0.0.1:80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./etc/ssl:/etc/nginx/certs
postgres:
environment:
POSTGRES_DB: ${POSTGRES_DATABASE}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
image: postgres:15-alpine
volumes:
- postgres:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
rabbitmq:
environment:
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_VHOST}
VIRTUAL_HOST: rabbitmq.dev.poeticmetric.com
VIRTUAL_PORT: "15672"
image: rabbitmq:3-management-alpine
ports:
- "127.0.0.1:15672:15672"
redis:
command:
- "redis-server"
- "--requirepass"
- "${REDIS_PASSWORD}"
image: redis:7-alpine
volumes:
- redis:/data
rest-api:
<<: *backend-common
environment:
<<: *backend-common-environment
INSTANCE: rest-api
VIRTUAL_HOST: api.dev.poeticmetric.com
# ports:
# - "127.0.0.1:2345:2345"
scheduler:
<<: *backend-common
environment:
<<: *backend-common-environment
INSTANCE: scheduler
# ports:
# - "127.0.0.1:2345:2345"
stripe-webhook:
environment:
STRIPE_API_KEY: ${STRIPE_SECRET_KEY}
STRIPE_DEVICE_NAME: poeticmetric-development-stripe-webhook
command:
- "listen"
- "--forward-to"
- "rest-api/stripe/webhook"
- "--events"
- "customer.subscription.created,customer.subscription.deleted,customer.subscription.updated"
image: stripe/stripe-cli
worker:
<<: *backend-common
environment:
<<: *backend-common-environment
INSTANCE: worker
# ports:
# - "127.0.0.1:2345:2345"