docker-compose.yml
version: "2.1"
services:
nb_app:
image: lscr.io/linuxserver/netbox:latest
container_name: netbox
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- SUPERUSER_EMAIL=${SUPERUSER_EMAIL}
- SUPERUSER_PASSWORD=${SUPERUSER_PASSWORD}
- ALLOWED_HOST=${ALLOWED_HOST}
- DB_NAME=netbox
- DB_USER=netbox
- DB_PASSWORD=${DB_PASSWORD}
- DB_HOST=nb_db
- DB_PORT=5432
- REDIS_HOST=nb_redis
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD}
- REDIS_DB_TASK=0
- REDIS_DB_CACHE=1
depends_on:
- nb_db
- nb_redis
volumes:
- /netbox/app:/config
ports:
- 8000:8000
restart: unless-stopped
nb_db:
image: postgres:latest
restart: unless-stopped
volumes:
- /netbox/db-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=netbox
- POSTGRES_USER=netbox
nb_redis:
image: redis:latest
restart: unless-stopped
command: redis-server --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- /netbox/redis:/data
This doesn’t work for me. Stack created without any error, but i cannot open the browser URL even when i changed the port number.
Are you using a reverse proxy? Make sure you are changing the ALLOWED_HOST=netbox.example.com to match your domain. What error are you getting? 500? 404? What do the container’s logs say?
Hi, are you sure this docker-compose + .env works?
Every time I get the following error:
redis.exceptions.ResponseError: WRONGPASS invalid username-password pair or user is disabled.
[uwsgi-daemons] respawning “/usr/bin/python3 ./manage.py rqworker” (uid: 1000 gid: 1000)
raise response
Do you have any clue why?
Kind regards,
questionmaster34
I have changed the code block formatting module, please try copying and pasting again. Make sure you are generating your own secure passwords for the environment variables and not leaving the defaults.
Also, make sure you are using your docker account UID and GID. If running as superuser, use 0 for both.