forked from V-Sekai/uro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (81 loc) · 1.61 KB
/
docker-compose.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
version: "3.9"
services:
database:
image: postgres:16.3-alpine
restart: always
shm_size: 128mb
environment:
POSTGRES_USER: vsekai
POSTGRES_PASSWORD: vsekai
volumes:
- "./postgres:/var/lib/postgresql/data"
healthcheck:
test: pg_isready -U vsekai
interval: 1s
timeout: 5s
redis:
image: redis:7.2-alpine
restart: always
shm_size: 128mb
volumes:
- "./redis:/data"
healthcheck:
test: redis-cli ping
interval: 1s
timeout: 5s
uro:
build:
context: .
restart: always
links:
- database
- redis
depends_on:
database:
condition: service_healthy
restart: true
redis:
condition: service_healthy
restart: true
env_file:
- .env
healthcheck:
test: curl --fail http://uro:4000/health || exit 1
interval: 1s
timeout: 5s
nextjs:
build:
context: ./frontend
dockerfile: Dockerfile
healthcheck:
test: curl --fail http://nextjs:3000/health || exit 1
interval: 1s
timeout: 5s
depends_on:
- uro
caddy:
image: caddy:2.8.4-alpine
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./caddy/data:/data
- ./caddy/config:/config
depends_on:
uro:
condition: service_healthy
restart: true
nextjs:
condition: service_healthy
restart: true
networks:
uro:
name: "uro"
volumes:
caddy_data:
caddy_config: