-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
89 lines (84 loc) · 3.2 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
version: "3.9"
services:
backend:
image: ghcr.io/dopeshot/beyond-life/backend:main
restart: "always"
ports:
- 3001:3001
environment:
# DB
- DB_USER_NAME=${BACKEND_DB_USER_NAME:-admin}
- DB_USER_PW=${BACKEND_DB_USER_PW:-admin}
- DB_HOST=${BACKEND_DB_HOST:-db}
- DB_PORT=${BACKEND_DB_PORT:-27017}
- DB_DB=${BACKEND_DB_DB:-siebtesleben}
# JWT
- JWT_SECRET=${BACKEND_JWT_SECRET:-secret}
- JWT_EXPIRE_TIME=${BACKEND_JWT_EXPIRE_TIME:-1h}
- JWT_REFRESH_SECRET=${BACKEND_JWT_REFRESH_SECRET:-verysecret}
- JWT_REFRESH_EXPIRE_TIME=${BACKEND_JWT_REFRESH_EXPIRE_TIME:-10d}
- JWT_VERIFY_SECRET=${BACKEND_JWT_VERIFY_SECRET:-evenmoresecret}
- JWT_VERIFY_EXPIRE_TIME=${BACKEND_JWT_VERIFY_EXPIRE_TIME:-1d}
- JWT_PASSWORD_RESET_SECRET=${BACKEND_JWT_PASSWORD_RESET_SECRET:-evensecretersecret}
- JWT_PASSWORD_RESET_EXPIRE_TIME=${BACKEND_JWT_PASSWORD_RESET_EXPIRE_TIME:-4h}
# Mail
- MAIL_HOST=${BACKEND_MAIL_HOST:-smtp}
- MAIL_HOST_PORT=${BACKEND_MAIL_HOST_PORT:-25}
- MAIL_IS_SECURE=${BACKLEND_MAIL_IS_SECURE:-false}
- MAIL_AUTH_USERNAME=${BACKEND_MAIL_AUTH_USERNAME:-mail}
- MAIL_AUTH_PW=${BACKEND_MAIL_AUTH_PW:-mail}
- MAIL_DEFAULT_SENDE=${BACKEND_MAIL_DEFAULT_SENDER:[email protected]}
# Stripe
- STRIPE_SECRET_KEY=${BACKEND_STRIPE_SECRET_KEY}
- STRIPE_CURRENCY=${BACKEND_STRIPE_CURRENCY:-eur}
- STRIPE_WEBHOOK_SECRET=${BACKEND_STRIPE_WEBHOOK_SECRET}
- STRIPE_ITEM_SINGLE=${BACKEND_STRIPE_ITEM_SINGLE}
- STRIPE_ITEM_FAMILY=${BACKEND_STRIPE_ITEM_FAMILY}
- STRIPE_ITEM_SINGLE_TO_FAMILY=${BACKEND_STRIPE_ITEM_SINGLE_TO_FAMILY}
- STRIPE_REDIRECT_ROUTE=${BACKEND_STRIPE_REDIRECT_ROUTE:-/last-will/order-confirmation}
# Other
- FRONTEND_DOMAIN=${BACKEND_FRONTEND_DOMAIN:-http://localhost:3000}
- NODE_ENV=${BACKEND_NODE_ENV:-development}
links:
- db:db
- smtp:smtp
frontend:
image: ghcr.io/dopeshot/beyond-life/frontend:main
restart: "always"
ports:
- 3000:3000
environment:
- NEXT_PUBLIC_API_BASE_URL=${FRONTEND_NEXT_PUBLIC_API_BASE_URL:-http://localhost:3001}
smtp:
image: rnwood/smtp4dev:v3
restart: "always"
ports:
- 25:25
- 5001:80
- 143:143
environment:
- RelayOptions__Login=${BACKEND_MAIL_AUTH_USERNAME:-mail}
- RelayOptions__Password=${BACKEND_MAIL_AUTH_PW:-mail}
db:
image: mongo:6.0.8
ports:
- 27018:27017
restart: "always"
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USER:-admin}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PW:-admin}
- MONGO_INITDB_DATABASE=${MONGO_DB:-siebtesleben}
volumes:
- ./.docker/mongodb-init/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
stripe-cli:
image: stripe/stripe-cli:v1.17.0
container_name: stripe-cli
command: "listen --api-key ${BACKEND_STRIPE_SECRET_KEY} --device-name docker_compose_stack --forward-to backend:3001/payments/webhook"
links:
- backend:backend