-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.full-stack.yml
More file actions
66 lines (61 loc) · 1.33 KB
/
docker-compose.full-stack.yml
File metadata and controls
66 lines (61 loc) · 1.33 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: automarket-db
environment:
POSTGRES_USER: automarket
POSTGRES_PASSWORD: automarket
POSTGRES_DB: automarket
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
restart: unless-stopped
networks:
- automarket
healthcheck:
test: ["CMD-SHELL", "pg_isready -U automarket"]
interval: 5s
timeout: 5s
retries: 5
# Backend API
backend:
build: ./automarket-backend
container_name: automarket-backend
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- CORS_ORIGIN=http://localhost:5173
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=automarket
- DB_USER=automarket
- DB_PASSWORD=automarket
env_file:
- ./automarket-backend/.env
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
networks:
- automarket
# Frontend Web App (Production)
web:
build: ./automarket-web
container_name: automarket-web
ports:
- "5173:80"
depends_on:
- backend
restart: unless-stopped
networks:
- automarket
networks:
automarket:
driver: bridge
volumes:
postgres-data: