Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
86 lines (82 loc) · 2.09 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
86 lines (82 loc) · 2.09 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
services:
vivery:
build: .
container_name: vivery
restart: unless-stopped
ports:
- "3000:3000"
environment:
HOST: 0.0.0.0
PORT: 3000
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_USER: vivery
DATABASE_PASSWORD: ${POSTGRES_PASSWORD:-vivery}
DATABASE_NAME: vivery
DATABASE_SSLMODE: disable
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
JWT_SECRET: ${JWT_SECRET}
JWT_ISSUER: ${JWT_ISSUER:-vivery}
JWT_EXP_MINUTES: ${JWT_EXP_MINUTES:-5}
REFRESH_EXP_DAYS: ${REFRESH_EXP_DAYS:-7}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# mediamtx:
# image: bluenviron/mediamtx:latest
# container_name: vivery-mediamtx
# restart: unless-stopped
# ports:
# - "8554:8554"
# - "8000:8000/udp"
# - "8001:8001/udp"
# - "1935:1935"
# - "8888:8888"
# - "8889:8889"
# - "8189:8189/udp"
# - "8890:8890/udp"
# - "9997:9997"
# volumes:
# - ./mediamtx.yml:/mediamtx.yml:ro
postgres:
image: postgres:17
container_name: vivery-postgres
restart: unless-stopped
environment:
POSTGRES_USER: vivery
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-vivery}
POSTGRES_DB: vivery
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U vivery"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:8.6-alpine
container_name: vivery-redis
restart: unless-stopped
command: >
sh -c '[ -n "$$REDIS_PASSWORD" ] && exec redis-server --requirepass "$$REDIS_PASSWORD" || exec redis-server'
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
volumes:
- redis_data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data:
redis_data: