-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (39 loc) · 854 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (39 loc) · 854 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
version: "3"
services:
web:
build:
dockerfile: Dockerfile.web
context: ./
depends_on:
- postgres
- redis
env_file:
- src/auction_db.env
- .env
ports:
- "80:8080"
postgres:
image: postgres:14.2-alpine
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "postgres" ]
timeout: 45s
interval: 10s
retries: 10
env_file:
- src/auction_db.env
volumes:
- ./db/persistent:/var/lib/postgresql/data:z
- ./db/init:/docker-entrypoint-initdb.d/
ports:
- "5432:5432"
redis:
image: redis:6-alpine
healthcheck:
test: ["CMD", "redis-cli","ping"]
timeout: 5s
interval: 10s
retries: 10
command: redis-server --requirepass ${REDIS_PASS}
restart: always
ports:
- "6379:6379"