-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
68 lines (67 loc) · 1.58 KB
/
docker-compose.yaml
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
services:
nginx:
build:
context: .
dockerfile: DockerfileNginxPlaywright
ports:
- 8080:8080
depends_on:
- webapp
webapp:
image: ris-norms-app:001
build:
context: .
dockerfile: DockerfileApp
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres14:5432/risnorms
- REDIS_HOST=redis
- SPRING_PROFILES_ACTIVE=local
depends_on:
- postgres14
- redis
volumes:
- ./local-storage:/app/.local-storage
postgres14:
image: postgres:14-alpine
restart: always
container_name: postgres14
volumes:
- postgres14-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=risnorms
- POSTGRES_PASSWORD=test
- POSTGRES_USER=test
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U test -d risnorms"]
interval: 5s
retries: 3
start_period: 5s
timeout: 3s
redis:
image: cgr.dev/chainguard/redis:latest
extra_hosts:
- localhost:host-gateway
container_name: redis
command:
- "--maxmemory 256mb"
- "--maxmemory-policy allkeys-lru"
- "--timeout 300"
- "--tcp-keepalive 10"
- "--user redis on +@all -CONFIG ~* >password"
- "--user default off resetchannels -@all"
ports:
- "6379:6379"
healthcheck:
test:
[
"CMD-SHELL",
"redis-cli -h 127.0.0.1 --user redis -a password PING | grep 'PONG' || exit 1",
]
interval: 5s
retries: 5
start_period: 3s
timeout: 5s
volumes:
postgres14-data: