kopia lustrzana https://github.com/jedie/PyInventory
56 wiersze
1.7 KiB
YAML
56 wiersze
1.7 KiB
YAML
|
version: "3.7"
|
||
|
|
||
|
services:
|
||
|
caddy: # https://hub.docker.com/_/caddy
|
||
|
image: caddy:2-alpine
|
||
|
restart: unless-stopped
|
||
|
ports:
|
||
|
- "80:80"
|
||
|
- "443:443"
|
||
|
volumes:
|
||
|
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
|
||
|
- ./volumes/static/:/srv/static/:ro
|
||
|
- ./volumes/media/:/srv/media/:ro
|
||
|
environment:
|
||
|
- HOSTNAME=${HOSTNAME:-localhost}
|
||
|
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL:-internal}
|
||
|
|
||
|
inventory:
|
||
|
build:
|
||
|
context: .
|
||
|
dockerfile: Dockerfile
|
||
|
restart: unless-stopped
|
||
|
hostname: inventory
|
||
|
ports:
|
||
|
- "8000"
|
||
|
env_file: ./common.env
|
||
|
environment:
|
||
|
- DJANGO_SETTINGS_MODULE=inventory_settings
|
||
|
- HOSTNAME=${HOSTNAME:-localhost}
|
||
|
links:
|
||
|
- postgres:postgres
|
||
|
depends_on:
|
||
|
- postgres
|
||
|
- caddy
|
||
|
volumes:
|
||
|
- ./inventory/:/inventory/
|
||
|
- ./volumes/static/:/static/:rw
|
||
|
- ./volumes/media/:/media/:rw
|
||
|
# e.g.: pip cache must be the same value as $XDG_CACHE_HOME !
|
||
|
- ./volumes/cache/:/var/cache/:rw
|
||
|
entrypoint: /inventory/entrypoint.sh
|
||
|
|
||
|
postgres:
|
||
|
# https://hub.docker.com/_/postgres
|
||
|
image: postgres:11-alpine
|
||
|
restart: unless-stopped
|
||
|
hostname: postgres
|
||
|
ports:
|
||
|
- "5432"
|
||
|
env_file: ./common.env
|
||
|
environment:
|
||
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||
|
volumes:
|
||
|
- ./postgres/init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh:ro
|
||
|
- ./volumes/postgresql/data/:/var/lib/postgresql/data/:rw
|