docker-inventree/docker-compose.yml
Adam Goldsmith a57e4acafb Initial Commit
Based on the official suggested docker config
2021-10-20 11:39:42 -04:00

65 lines
1.6 KiB
YAML

version: "3.8"
services:
inventree-db:
container_name: inventree-db
image: postgres:13
environment:
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
volumes:
- db:/var/lib/postgresql/data/
restart: unless-stopped
inventree-server:
container_name: inventree-server
image: inventree/inventree:latest
expose:
- 8000
depends_on:
- inventree-db
volumes:
- data:/home/inventree/data
environment: &InvenTree_env
# Ensure debug is false for a production setup
INVENTREE_DEBUG: "False"
INVENTREE_LOG_LEVEL: "WARNING"
INVENTREE_DB_ENGINE: "postgresql"
INVENTREE_DB_HOST: "inventree-db"
INVENTREE_DB_PORT: "5432"
INVENTREE_DB_NAME: "${POSTGRES_DB}"
INVENTREE_DB_USER: "${POSTGRES_USER}"
INVENTREE_DB_PASSWORD: "${POSTGRES_PASSWORD}"
restart: unless-stopped
# Background worker process handles long-running or periodic tasks
inventree-worker:
container_name: inventree-worker
image: inventree/inventree:latest
command: invoke worker
depends_on:
- inventree-db
- inventree-server
volumes:
- data:/home/inventree/data
environment: *InvenTree_env
restart: unless-stopped
inventree-proxy:
container_name: inventree-proxy
image: nginx:stable
depends_on:
- inventree-server
ports:
- 127.0.0.1:31324:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- data:/var/www
restart: unless-stopped
volumes:
db:
data: