59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
---
|
||
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
|