-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (41 loc) · 895 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (41 loc) · 895 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
version: "3.8"
services:
db:
container_name: postgres_container
image: postgres:13
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: test_db
ports:
- "5432:5432"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- sce_parking_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root -d test_db"]
interval: 5s
timeout: 5s
retries: 5
server:
build: .
container_name: parking_server
restart: always
ports:
- "8000:8000"
environment:
- HOST=0.0.0.0
- PORT=8000
- VERBOSE=2
- PYTHONUNBUFFERED=1
depends_on:
db:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
sce_parking_data: