netbox-docker/docker-compose.yml

36 lines
951 B
YAML

version: '3'
services:
netbox:
build:
context: .
args:
- BRANCH=${BRANCH-master}
image: ninech/netbox:${BRANCH-master}
depends_on:
- postgres
env_file: netbox.env
volumes:
- netbox-nginx-config:/etc/netbox-nginx/
- netbox-static-files:/opt/netbox/netbox/static
nginx:
image: nginx:1.11-alpine
command: nginx -g 'daemon off;' -c /etc/netbox-nginx/nginx.conf
depends_on:
- netbox
ports:
- 80
volumes:
- netbox-static-files:/opt/netbox/netbox/static
- netbox-nginx-config:/etc/netbox-nginx/
postgres:
image: postgres:9.6-alpine
environment:
POSTGRES_USER: netbox
POSTGRES_PASSWORD: J5brHrAXFLQSif0K
POSTGRES_DB: netbox
volumes:
netbox-static-files:
driver: local
netbox-nginx-config:
driver: local