netbox-docker/docker-compose.yml

65 lines
1.8 KiB
YAML
Raw Normal View History

2017-04-21 13:46:15 +02:00
version: '3'
services:
netbox:
build:
context: .
args:
2017-10-16 13:33:12 +02:00
- BRANCH=${VERSION-master}
image: ninech/netbox:${VERSION-latest}
depends_on:
- postgres
- redis
2017-04-21 13:46:15 +02:00
env_file: netbox.env
volumes:
- ./startup_scripts:/opt/netbox/startup_scripts:ro
- ./initializers:/opt/netbox/initializers:ro
- ./configuration:/etc/netbox/config:ro
2017-04-21 13:46:15 +02:00
- netbox-nginx-config:/etc/netbox-nginx/
- netbox-static-files:/opt/netbox/netbox/static
- netbox-media-files:/opt/netbox/netbox/media
- netbox-report-files:/etc/netbox/reports:ro
nginx:
image: nginx:1.13-alpine
command: nginx -g 'daemon off;' -c /etc/netbox-nginx/nginx.conf
depends_on:
- netbox
ports:
- 8080
2017-04-21 13:46:15 +02:00
volumes:
- netbox-static-files:/opt/netbox/netbox/static:ro
- netbox-nginx-config:/etc/netbox-nginx/:ro
2017-04-21 13:46:15 +02:00
postgres:
image: postgres:10.4-alpine
env_file: postgres.env
volumes:
- netbox-postgres-data:/var/lib/postgresql/data
redis:
image: redis:4-alpine
environment:
REDIS_PASS_FILE: /run/secrets/redis-pass
command: [
"sh", "-c",
'
docker-entrypoint.sh
--appendonly yes
--requirepass "$$(cat $$REDIS_PASS_FILE)"
'
]
volumes:
- ./redis-pass:/run/secrets/redis-pass
- netbox-redis-data:/data
volumes:
netbox-static-files:
driver: local
2017-04-21 13:46:15 +02:00
netbox-nginx-config:
driver: local
netbox-media-files:
driver: local
netbox-report-files:
driver: local
netbox-postgres-data:
driver: local
netbox-redis-data:
driver: local