Compare commits

...

3 Commits

Author SHA1 Message Date
198d1749b8 a simpler pass for testing 2023-01-25 08:58:01 +05:00
b13c7c6aa6 readme update 2023-01-25 07:59:58 +05:00
94d020c9ba fix readme, first pull config file 2023-01-25 07:58:53 +05:00
3 changed files with 17 additions and 3 deletions

View File

@@ -33,5 +33,13 @@ RUN pip install -r requirements.txt \
# change working dir to application # change working dir to application
WORKDIR /opt/netbox/netbox WORKDIR /opt/netbox/netbox
# Static files generation
RUN cp netbox/configuration_example.py netbox/configuration.py \
&& python manage.py collectstatic --no-input \
&& rm netbox/configuration.py
# Web server setup
RUN cp /opt/netbox/contrib/gunicorn.py /opt/netbox/gunicorn.py
# run the service # run the service
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

View File

@@ -26,19 +26,19 @@ services:
environment: environment:
- POSTGRES_DB=netbox - POSTGRES_DB=netbox
- POSTGRES_USER=netbox - POSTGRES_USER=netbox
- POSTGRES_PASSWORD=even-confider-closable # CHANGE THIS IN PRODUCTION !! - POSTGRES_PASSWORD=netbox # CHANGE THIS IN PRODUCTION !!
restart: always restart: always
################################################ ################################################
redis: redis:
image: redis:6.0-alpine image: redis:6.0-alpine
restart: always restart: always
``` ```
- Fetch example config from container `docker compose run --rm netbox cat /opt/netbox/netbox/netbox/configuration_example.py > configuration.py` and edit it according to your enviroment.
- Create `devicetype-images` and `image-attachments` folders under media folder - Create `devicetype-images` and `image-attachments` folders under media folder
```bash ```bash
mkdir -p media/image-attachments media/devicetype-images mkdir -p media/image-attachments media/devicetype-images
``` ```
- Generate Secret key `docker compose run --rm netbox ./generate_secret_key.py`, this will be needed in next step - Generate Secret key `docker compose run --rm netbox ./generate_secret_key.py`, add output of this to configuration.py
- Fetch example config from container `docker compose run --rm netbox cat /opt/netbox/netbox/netbox/configuration_example.py > configuration.py` and edit it according to your enviroment.
- Run `docker compose up -d` - Run `docker compose up -d`
## PLEASE, FOR THE LOVE OF GOD PLEASE DO NOT USE PASSWORD I GAVE IN THIS REPO IN PRODUCTION !! ## PLEASE, FOR THE LOVE OF GOD PLEASE DO NOT USE PASSWORD I GAVE IN THIS REPO IN PRODUCTION !!

6
nohup.out Normal file
View File

@@ -0,0 +1,6 @@
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 448.2 MB/s (42151 bytes in 0.000s)
[server] INFO: Device: Xiaomi M2101K6I (Android 11)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 22.3.3
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2400