-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (41 loc) · 916 Bytes
/
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
version: "3"
services:
db:
container_name: p2p_db
image: postgres:12-alpine
ports:
- "5432:5432"
env_file:
- db.env
volumes:
- ./postgres-data:/var/lib/postgresql/data
- ./sql/create_db.sql:/docker-entrypoint-initdb.d/create_db.sql
restart: unless-stopped
healthcheck:
test: nc -z localhost 5432
cache:
container_name: p2p_cache
image: redis:6.2.5-alpine
command: redis-server --requirepass secret_strings_super
ports:
- "6379:6379"
volumes:
- ./redis/data:/data
restart: unless-stopped
web:
container_name: p2p_web
build: .
env_file:
- .env
volumes:
- .:/app/
restart: unless-stopped
ports:
- "8081:8080"
depends_on:
db:
condition: service_healthy
cache:
condition: service_started
labels:
kompose.service.type: LoadBalancer