-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (52 loc) · 1.41 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
services:
myna:
image: ghcr.io/maizy/myna:0.0.1-preview3
ports:
# for using with reverse proxy
- "127.0.0.1:12813:12813"
# for using directly
#- "12813:12813"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
- 'SPRING_DATASOURCE_USERNAME=myna'
- 'SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/myna'
- 'SPRING_DATA_REDIS_HOST=redis'
- 'SPRING_DATA_REDIS_PORT=6379'
env_file:
- ./myna.env
restart: unless-stopped
postgres:
image: postgres:16.1-alpine
environment:
POSTGRES_USER: myna
POSTGRES_DB: myna
TZ: UTC
env_file:
- ./myna.env
volumes:
# path for postgres data
- ./data/postgres/data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "myna"]
start_period: 30s
interval: 10s
timeout: 2s
restart: unless-stopped
redis:
image: redis:7.2.4-alpine
env_file:
- ./myna.env
volumes:
# path for redis data
- ./data/redis:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli --no-auth-warning -a $$SPRING_DATA_REDIS_PASSWORD ping | grep PONG"]
start_period: 5s
interval: 10s
timeout: 1s
command: sh -c 'redis-server --save 5 1 --loglevel warning --requirepass "$$SPRING_DATA_REDIS_PASSWORD"'
restart: unless-stopped