netbox-docker/docker-compose.yml
Christian Mäder bd9298e668
❇️ Make the default configuration cluster ready
This changes the default configuration to be better prepared for
usage with container management platforms, such as Docker Swarm,
Kubernetes or OpenShift.

Closes #27.
2017-12-14 12:53:19 +01:00

40 lines
1.0 KiB
YAML

version: '3'
services:
netbox:
build:
context: .
args:
- BRANCH=${VERSION-master}
image: ninech/netbox:${VERSION-latest}
depends_on:
- postgres
env_file: netbox.env
volumes:
- netbox-nginx-config:/etc/netbox-nginx/
- netbox-static-files:/opt/netbox/netbox/static
- netbox-media-files:/opt/netbox/netbox/media
- netbox-report-files:/opt/netbox/netbox/reports
nginx:
image: nginx:1.11-alpine
command: nginx -g 'daemon off;' -c /etc/netbox-nginx/nginx.conf
depends_on:
- netbox
ports:
- 8080
volumes:
- netbox-static-files:/opt/netbox/netbox/static
- netbox-nginx-config:/etc/netbox-nginx/
postgres:
image: postgres:9.6-alpine
env_file: postgres.env
volumes:
netbox-static-files:
driver: local
netbox-nginx-config:
driver: local
netbox-media-files:
driver: local
netbox-report-files:
driver: local