-
Notifications
You must be signed in to change notification settings - Fork 0
/
movies_persons_service.yml
67 lines (63 loc) · 1.62 KB
/
movies_persons_service.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
version: "3.8"
include:
- movies_persons_db/movies_persons_db.yml
networks:
movies_persons_service_network:
name: "movies_persons_service_net"
driver: bridge
services:
movies_persons_service:
build:
dockerfile: alpine.Dockerfile
command: ./bin/app
volumes:
- ./docker/containers-configs/:/configs
ports:
- 9902:8080
networks:
- movies_persons_service_network
- movies_persons_db_network
environment:
DB_PASSWORD: ${DB_PASSWORD}
MOVIES_PERSONS_CACHE_PASSWORD: ${REDIS_PASSWORD}
depends_on:
movies_persons_db:
condition: service_healthy
movies_persons_cache:
condition: service_healthy
healthcheck:
test: wget --no-verbose --tries=1 --spider 'http://localhost:7001/healthcheck' || exit 1
interval: 40s
timeout: 20s
retries: 3
start_period: 20s
deploy:
mode: replicated
replicas: 1
endpoint_mode: dnsrr
restart_policy:
condition: unless-stopped
labels:
servicename: "movies_persons_service"
org.label-schema.group: "monitoring"
movies_persons_cache:
hostname: redis
image: redis:7.2.1-alpine
volumes:
- ./.container_data/cache/data:/data
ports:
- 6376:6379
networks:
- movies_persons_service_network
environment:
ALLOW_EMPTY_PASSWORD: no
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_AOF_ENABLED: ${REDIS_AOF_ENABLED}
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
deploy:
restart_policy:
condition: unless-stopped