forked from pythoninthegrasses/python_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (33 loc) · 729 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
36 lines (33 loc) · 729 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
version: '3'
services:
web:
build: ./
ports:
- "80:8000"
depends_on:
db:
condition: service_healthy
# command: sh -c "sleep infinity"
command: ["python", "app.py"]
db:
image: postgres
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${POSTGRES_DB:-postgres}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mysecretpassword}
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
adminer:
image: adminer
restart: unless-stopped
depends_on:
db:
condition: service_healthy
ports:
- "8080:8080"