-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.prod.yml
87 lines (86 loc) · 2.05 KB
/
docker-compose.prod.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
79
80
81
82
83
84
85
86
87
version: '3'
services:
db:
image: postgres:14.4
environment:
POSTGRES_DB: strapi
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_USER: ${DATABASE_USERNAME}
volumes:
- ./postgres-data:/var/lib/postgresql/data
profiles:
- default
web:
build:
context: ./web
dockerfile: Dockerfile
args:
PRIMARY_COLOR: ${PRIMARY_COLOR}
SECONDARY_COLOR: ${SECONDARY_COLOR}
environment:
STRAPI_API_URL: http://cms:1337
STRAPI_PUBLIC_URL: ${STRAPI_URL}
STRAPI_TOKEN: ${STRAPI_TOKEN}
MERCHANT_ID: ${PAYTRAIL_MERCHANT_ID}
SECRET_KEY: ${PAYTRAIL_SECRET_KEY}
URL: ${URL}
CALLBACK_URL: ${URL}/api/verifyPaymentCallback
profiles:
- default
cms:
build:
context: ./cms
dockerfile: Dockerfile
args:
URL: ${STRAPI_URL}
environment:
HOST: 0.0.0.0
PORT: 1337
NODE_ENV: production
DATABASE_CLIENT: postgres
DATABASE_NAME: strapi
DATABASE_HOST: db
DATABASE_PORT: 5432
URL: ${STRAPI_URL}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
APP_KEYS: ${APP_KEYS}
API_TOKEN_SALT: ${API_TOKEN_SALT}
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
TRANSER_TOKEN_SALT: ${TRANSFER_TOKEN_SALT}
JWT_SECRET: ${JWT_SECRET}
SMTP_USER: ${SMTP_USER}
SMTP_PASSWORD: ${SMTP_PASSWORD}
depends_on:
- db
profiles:
- default
nginx:
image: nginx:latest
volumes:
- ./nginx/nginx.prod.conf:/etc/nginx/nginx.conf:ro
- ./certbot/conf:/etc/letsencrypt:ro
- ./certbot/www:/var/www/certbot
depends_on:
- web
- cms
ports:
- 80:80
- 443:443
profiles:
- default
certbot:
image: certbot/certbot
ports:
- 80:80
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
profiles:
- setup
command: >
certonly
--standalone
-d ${FQDN}
--email ${CERTBOT_EMAIL}
--agree-tos