run in docker
This commit is contained in:
22
docker-compose.yml
Normal file
22
docker-compose.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
services:
|
||||
hosts_app:
|
||||
build: .
|
||||
container_name: hosts_app
|
||||
ports:
|
||||
- "${APP_PORT:-5580}:5580"
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"python",
|
||||
"-c",
|
||||
"import urllib.request; import sys; sys.exit(0) if urllib.request.urlopen('http://localhost:8000/').getcode() == 200 else sys.exit(1)"
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./instance:/app/instance
|
||||
restart: unless-stopped
|
Reference in New Issue
Block a user