-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
82 lines (77 loc) · 2.21 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
services:
strapi-cloudflared:
image: cloudflare/cloudflared:latest
container_name: strapi-cloudflared
restart: unless-stopped
command: tunnel --no-autoupdate run
environment:
TUNNEL_TOKEN: ${CLOUDFLARE_TUNNEL_TOKEN}
REAL_IP_HEADER: Cf-Connecting-Ip
networks:
- strapi-shared-network
depends_on:
- strapi-nginx
strapi-nginx:
image: nginx:1
container_name: strapi-nginx
restart: unless-stopped
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
networks:
- strapi-shared-network
depends_on:
- strapi
strapi:
container_name: strapi
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- 1337:1337
environment:
NODE_ENV: production
DATABASE_CLIENT: postgres
DATABASE_HOST: strapi-postgres
DATABASE_PORT: 5432
DATABASE_NAME: strapi
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
APP_KEYS: ${APP_KEYS}
JWT_SECRET: ${JWT_SECRET}
API_TOKEN_SALT: ${API_TOKEN_SALT}
TRANSFER_TOKEN_SALT: ${TRANSFER_TOKEN_SALT}
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
HETZNER_BUCKET_ACCESS_KEY_ID: ${HETZNER_BUCKET_ACCESS_KEY_ID}
HETZNER_BUCKET_ACCESS_SECRET: ${HETZNER_BUCKET_ACCESS_SECRET}
HETZNER_BUCKET_REGION: ${HETZNER_BUCKET_REGION}
HETZNER_BUCKET_NAME: ${HETZNER_BUCKET_NAME}
HETZNER_BUCKET_ENDPOINT: ${HETZNER_BUCKET_ENDPOINT}
HETZNER_BUCKET_HOST: ${HETZNER_BUCKET_HOST}
volumes:
- ./config:/opt/app/config
- ./src:/opt/app/src
- ./package.json:/opt/package.json
- ./package-lock.json:/opt/package-lock.json
- ./public/uploads:/opt/app/public/uploads
networks:
- strapi-shared-network
depends_on:
- strapi-postgres
strapi-postgres:
container_name: strapi-postgres
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: strapi
POSTGRES_DB: strapi
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
volumes:
- "strapi_postgres_data:/var/lib/postgresql/data"
networks:
- strapi-shared-network
volumes:
strapi_postgres_data:
networks:
strapi-shared-network:
external: true