49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
# Development stack built from source. The installable package is in dist/.
|
|
x-api: &api
|
|
build:
|
|
context: .
|
|
dockerfile: WebApi/Dockerfile
|
|
image: isssteleon/webapi:dev
|
|
# SQLite files in the webapi_data volume by default; point the
|
|
# *_DATABASE_URL variables at another engine in .env (see .env.example).
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
volumes:
|
|
- webapi_data:/data
|
|
|
|
services:
|
|
webapi:
|
|
<<: *api
|
|
ports:
|
|
# 5000 on the host is taken by AirPlay on macOS.
|
|
- "5050:5000"
|
|
healthcheck:
|
|
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/health', timeout=5)"]
|
|
interval: 15s
|
|
timeout: 6s
|
|
retries: 5
|
|
start_period: 180s
|
|
|
|
# Recomputes a domain's indicators after an import writes to it.
|
|
indicadores:
|
|
<<: *api
|
|
command: ["indicadores"]
|
|
depends_on:
|
|
webapi:
|
|
condition: service_healthy
|
|
|
|
webapp:
|
|
build:
|
|
context: ./WebApp
|
|
image: isssteleon/webapp:dev
|
|
# nginx with the production build, proxying the API paths to webapi
|
|
# (WebApp/nginx.conf).
|
|
ports:
|
|
- "8080:80"
|
|
depends_on:
|
|
- webapi
|
|
|
|
volumes:
|
|
webapi_data:
|