1
0
Fork 0
docker_container_template/netbox/docker-compose.yaml
2022-09-09 09:01:49 +02:00

59 lines
1.3 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
version: "2.1"
networks:
netboxnet:
services:
#netbox
netbox:
image: lscr.io/linuxserver/netbox:latest
container_name: netbox_app
depends_on:
- db
- redis
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- SUPERUSER_EMAIL=${SUPERUSER_EMAIL}
- SUPERUSER_PASSWORD=${SUPERUSER_PASSWORD}
- ALLOWED_HOST=${ALLOWED_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
volumes:
- ./config:/config
networks:
- netboxnet
ports:
- ${NETBOX_PORT}:8000
restart: unless-stopped
# postgres
db:
image: postgres:latest
container_name: netbox_db
restart: always
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
networks:
- netboxnet
ports:
- ${DB_PORT}:5432
volumes:
- ./db:/var/lib/postgresql/data
# redis
redis:
image: 'bitnami/redis:latest'
container_name: netbox_redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
networks:
- netboxnet
ports:
- ${REDIS_PORT}:6379