Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
121 lines (110 loc) · 2.78 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
121 lines (110 loc) · 2.78 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
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
114
115
116
117
118
119
services:
database:
image: postgres:alpine
restart: always
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql
env_file: .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-myuser} -d ${POSTGRES_DB:-mydatabase} -h localhost"]
interval: 10s
timeout: 5s
retries: 5
networks:
- unipoint-network
redis:
image: redis:7-alpine
restart: always
env_file: .env
volumes:
- redis_data:/data
command: /bin/sh -c 'redis-server --appendonly yes --requirepass "$${REDIS_PASSWORD}"'
healthcheck:
test: ["CMD-SHELL", "redis-cli -a \"$${REDIS_PASSWORD}\" ping | grep PONG"]
interval: 10s
timeout: 5s
retries: 5
networks:
- unipoint-network
rabbitmq:
image: rabbitmq:3.12-management-alpine
restart: always
env_file: .env
volumes:
- rabbitmq_data:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 5s
retries: 5
networks:
- unipoint-network
opencv:
build: ./opencv
image: ${DOCKER_REGISTRY:-ghcr.io/nguyentukien}/unipoint-opencv:${TAG:-latest}
restart: always
env_file: .env
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=3).read()\""]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
networks:
- unipoint-network
backend:
build: ./backend
image: ${DOCKER_REGISTRY:-ghcr.io/nguyentukien}/unipoint-backend:${TAG:-latest}
restart: always
env_file: .env
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
rabbitmq:
condition: service_healthy
opencv:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "wget -qO- http://localhost:8080/api/actuator/health | grep UP" ]
interval: 30s
timeout: 10s
retries: 5
volumes:
- logs:/app/logs
networks:
- unipoint-network
frontend:
build:
context: ./frontend
args:
- VITE_API_PROXY_TARGET=http://backend:8080
image: ${DOCKER_REGISTRY:-ghcr.io/nguyentukien}/unipoint-frontend:${TAG:-latest}
restart: always
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
networks:
- unipoint-network
cloudflare:
image: cloudflare/cloudflared:2026.3.0
restart: always
env_file: .env
command: tunnel --no-autoupdate run --token ${CLOUDFLARE_TUNNEL_TOKEN}
# depends_on:
# - frontend
networks:
- unipoint-network
volumes:
logs:
pg_data:
redis_data:
rabbitmq_data:
networks:
unipoint-network:
driver: bridge