added some readme
This commit is contained in:
parent
7b9ebf426b
commit
be4fbc5eca
47
README.md
Normal file
47
README.md
Normal file
@ -0,0 +1,47 @@
|
||||
|
||||
|
||||
- Production `docker-compose.yml`
|
||||
|
||||
```yaml
|
||||
version: '3.5'
|
||||
services:
|
||||
################################################
|
||||
netbox:
|
||||
image: git.shihaam.dev/dockerfiles/netbox
|
||||
ports:
|
||||
- 8000:8000
|
||||
volumes:
|
||||
- ./configuration.py:/opt/netbox/netbox/netbox/configuration.py
|
||||
command: python manage.py runserver 0.0.0.0:8000 --insecure # COMMENT THIS LINE WHEN RUNNING IN PRODUCTION
|
||||
depends_on:
|
||||
- redis
|
||||
- postgres
|
||||
################################################
|
||||
postgres:
|
||||
image: postgres:13-alpine
|
||||
volumes:
|
||||
- ./data/db:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=netbox
|
||||
- POSTGRES_USER=netbox
|
||||
- POSTGRES_PASSWORD=even-confider-closable
|
||||
restart: always
|
||||
################################################
|
||||
redis:
|
||||
image: redis:6.0-alpine
|
||||
restart: always
|
||||
```
|
||||
|
||||
- save this as docker-compose.yml and run `docker compose up -d`
|
||||
|
||||
## Some commands that will be useful
|
||||
- Migrate Database (required on initial install and upgrade
|
||||
```bash
|
||||
docker compose exec netbox ./manage.py migrate
|
||||
```
|
||||
- Create new Superuser account, (it might not show any output, just enter a username and press enter)
|
||||
```bash
|
||||
docker compose exec netbox ./manage.py createsuperuser
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user