-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (96 loc) · 2.23 KB
/
docker-compose.yml
File metadata and controls
100 lines (96 loc) · 2.23 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
services:
postgres:
image: postgres:13
container_name: verigate-postgres
environment:
POSTGRES_DB: ${POSTGRES_DB:-verigate}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- verigate-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 1s
retries: 3
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
command: >
postgres
-c shared_buffers=256MB
-c max_connections=200
-c effective_cache_size=1GB
redis:
image: redis:6
container_name: verigate-redis
ports:
- "127.0.0.1:${REDIS_PORT:-6379}:6379"
volumes:
- redis_data:/data
networks:
- verigate-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 1s
retries: 3
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
command: >
redis-server
--appendonly yes
--appendfsync everysec
--maxmemory 256mb
--maxmemory-policy allkeys-lru
verigate-server:
build:
context: .
dockerfile: Dockerfile
container_name: verigate-server
ports:
- "${APP_PORT:-8080}:${APP_PORT:-8080}"
env_file:
- .env
environment:
# Host override for host network
POSTGRES_HOST: postgres
REDIS_HOST: redis
networks:
- verigate-network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "20m"
max-file: "5"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:${APP_PORT:-8080}/health"]
interval: 5s
timeout: 2s
retries: 3
start_period: 10s
volumes:
postgres_data:
driver: local
redis_data:
driver: local
networks:
verigate-network:
driver: bridge