-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.vth.prod.yml
99 lines (98 loc) · 2.74 KB
/
docker-compose.vth.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
88
89
90
91
92
93
94
95
96
97
98
99
version: "3.8"
services:
vth_strapi:
container_name: vth_strapi
build:
context: .
dockerfile: Dockerfile.prod
image: vth-strapi:latest
restart: unless-stopped
volumes:
- ./apps/vth-dashboard/public/uploads:/opt/app/apps/vth-dashboard/public/uploads
command: npm run --workspace @frameless/vth-dashboard start
environment:
HOST: ${HOST}
PORT: ${PORT}
APP_KEYS: ${APP_KEYS}
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
JWT_SECRET: ${JWT_SECRET}
API_TOKEN_SALT: ${API_TOKEN_SALT}
PREVIEW_SECRET_TOKEN: ${PREVIEW_SECRET_TOKEN}
TRANSFER_TOKEN_SALT: ${TRANSFER_TOKEN_SALT}
FRONTEND_PUBLIC_URL: ${FRONTEND_PUBLIC_URL}
DATABASE_CLIENT: ${DATABASE_CLIENT}
DATABASE_HOST: vth_strapi_db
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
STRAPI_ENV_LABEL: ${STRAPI_ENV_LABEL}
NODE_ENV: ${NODE_ENV}
ports:
- "1337:1337"
networks:
- vth_strapi_network
depends_on:
- vth_strapi_db
vth_frontend:
container_name: vth_frontend
build:
context: .
dockerfile: Dockerfile.prod
restart: unless-stopped
command: ./bin/wait-for-it.sh vth_strapi:1337 -- npm run --workspace @frameless/vth-frontend start
environment:
PREVIEW_SECRET_TOKEN: ${PREVIEW_SECRET_TOKEN}
STRAPI_PRIVATE_URL: ${STRAPI_PRIVATE_URL}
FRONTEND_PUBLIC_URL: ${FRONTEND_PUBLIC_URL}
STRAPI_PUBLIC_URL: ${STRAPI_PUBLIC_URL}
ports:
- "3000:3000"
networks:
- vth_strapi_network
depends_on:
- vth_strapi
- vth_strapi_db
vth_strapi_db:
container_name: vth_strapi_db
platform: linux/amd64 #for platform error on Apple M1 chips
restart: unless-stopped
image: postgres:12.0-alpine
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
healthcheck:
test:
[
"CMD-SHELL",
"sh -c 'pg_isready -U ${DATABASE_USERNAME} -d ${DATABASE_NAME}'",
]
interval: 10s
timeout: 3s
retries: 3
volumes:
- vth-strapi-data:/var/lib/postgresql/data/
ports:
- "5432:5432"
networks:
- vth_strapi_network
vth_pgadmin:
container_name: vth_pgadmin
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
ports:
- "9000:80"
networks:
- vth_strapi_network
depends_on:
- vth_strapi_db
volumes:
vth-strapi-data:
networks:
vth_strapi_network:
name: Strapi network
driver: bridge