mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2024-11-07 16:44:02 +01:00
43cb9f7e50
Initializers are startup scripts for common tasks like creating custom fields. These are problems many users of Netbox Docker potentially face and are therefore worth sharing.
46 lines
1.3 KiB
YAML
46 lines
1.3 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:
|
|
- ./startup_scripts:/opt/netbox/startup_scripts
|
|
- ./initializers:/opt/netbox/initializers
|
|
- 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-postgres-data:/var/lib/postgresql/data
|
|
|
|
volumes:
|
|
netbox-static-files:
|
|
driver: local
|
|
netbox-nginx-config:
|
|
driver: local
|
|
netbox-media-files:
|
|
driver: local
|
|
netbox-report-files:
|
|
driver: local
|
|
netbox-postgres-data:
|
|
driver: local
|