-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.vth.dev.yml
113 lines (111 loc) · 3.38 KB
/
docker-compose.vth.dev.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: "3"
services:
vth_strapi:
container_name: vth_strapi
build:
context: .
dockerfile: Dockerfile.dev
image: vth-strapi:latest
restart: unless-stopped
volumes:
- ./package.json:/opt/app/package.json
- ./yarn.lock:/opt/app/yarn.lock
- ./apps/vth-dashboard/config:/opt/app/apps/vth-dashboard/config
- ./apps/vth-dashboard/src:/opt/app/apps/vth-dashboard/src
- ./apps/vth-dashboard/package.json:/opt/app/apps/vth-dashboard/package.json
- ./apps/vth-dashboard/public/:/opt/app/apps/vth-dashboard/public/
entrypoint: ["/bin/sh", "-c"]
command:
- |
npm run dev --workspace @frameless/vth-dashboard
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}
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}
FRONTEND_PUBLIC_URL: ${FRONTEND_PUBLIC_URL}
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.dev
restart: unless-stopped
command: ./bin/wait-for-it.sh -s vth_strapi:1337 -t 25 -- npm run dev --workspace @frameless/vth-frontend
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}
volumes: # enable hot-reload
- ./apps/vth-frontend/src:/opt/app/apps/vth-frontend/src
- ./apps/vth-frontend/public:/opt/app/apps/vth-frontend/public
- ./apps/vth-frontend/.next:/opt/app/apps/vth-frontend/.next
- ./apps/vth-frontend/package.json:/opt/app/apps/vth-frontend/package.json
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:
- "8080:80"
networks:
- vth_strapi_network
depends_on:
- vth_strapi_db
volumes:
vth-strapi-data:
networks:
vth_strapi_network:
name: Strapi network
driver: bridge