-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-servers.yml
More file actions
44 lines (41 loc) · 979 Bytes
/
docker-compose-servers.yml
File metadata and controls
44 lines (41 loc) · 979 Bytes
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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: avail-postgres
environment:
POSTGRES_DB: avail_explorer
POSTGRES_USER: avail_user
POSTGRES_PASSWORD: ni_vineet_21
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U avail_user -d avail_explorer"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
# Redis Cache
redis:
image: redis:7-alpine
container_name: avail-redis
command: redis-server --appendonly yes
volumes:
- redis_data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
volumes:
postgres_data:
driver: local
redis_data:
driver: local