-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (65 loc) · 1.66 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (65 loc) · 1.66 KB
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
## =========================
## docker-compose.yml
## =========================
services:
db:
image: dockerhub.timeweb.cloud/library/postgres:16-alpine
container_name: project-db
environment:
POSTGRES_DB: aiwardrobe
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
server:
image: ghcr.io/luckx16/ai-wardrobe-server:latest
container_name: project-server
environment:
NODE_ENV: production
PORT: '4000'
DATABASE_URL_PROD: postgresql://postgres:postgres@db:5432/aiwardrobe
JWT_ACCESS: ${JWT_ACCESS}
JWT_REFRESH: ${JWT_REFRESH}
GIGACHAT_CREDENTIALS: ${GIGACHAT_CREDENTIALS}
GIGACHAT_SCOPE: ${GIGACHAT_SCOPE}
ports:
- '4000:4000'
volumes:
- uploads_data:/app/src/public/uploads
- ./.env:/app/.env:ro
depends_on:
db:
condition: service_healthy
command: ['sh', '-c', 'npx sequelize-cli db:migrate; node ./src/app.js']
restart: unless-stopped
client:
image: ghcr.io/luckx16/ai-wardrobe-client:latest
container_name: project-client
environment:
NODE_ENV: production
PORT: '3000'
depends_on:
- server
ports:
- '3000:3000'
restart: unless-stopped
caddy:
image: caddy:2-alpine
network_mode: host
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
depends_on:
- server
- client
restart: unless-stopped
volumes:
caddy_data:
uploads_data:
db_data: