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