blob: 4605e66d6f2b015ba94c0fbc5db2090ba149b9e0 (
plain)
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
|
services:
# PostgreSQL Database
postgres:
image: postgres:18-alpine
container_name: robot-tracker-db
restart: unless-stopped
environment:
POSTGRES_DB: robot_tracker_db
POSTGRES_USER: robot_master
POSTGRES_PASSWORD: roboMaster123
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U robot_master -d robot_tracker_db"]
interval: 10s
timeout: 5s
retries: 5
# Redis Cache
redis:
image: redis:7-alpine
container_name: robot-tracker-redis
restart: unless-stopped
command: redis-server --requirepass redispassword
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Backend API
backend:
build: ./backend
container_name: robot-tracker-backend
restart: unless-stopped
env_file:
- ./backend/.env.docker
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# Frontend
frontend:
build: ./frontend
container_name: robot-tracker-frontend
restart: unless-stopped
ports:
- "5173:80"
depends_on:
- backend
volumes:
postgres_data:
|