commit
0a9991de96
@ -68,6 +68,13 @@ COPY configuration/configuration.py /etc/netbox/config/configuration.py
|
|||||||
|
|
||||||
WORKDIR /opt/netbox/netbox
|
WORKDIR /opt/netbox/netbox
|
||||||
|
|
||||||
|
# Must set permissions for '/opt/netbox/netbox/static' directory
|
||||||
|
# to g+w so that `./manage.py collectstatic` can be executed during
|
||||||
|
# container startup.
|
||||||
|
# Must set permissions for '/opt/netbox/netbox/media' directory
|
||||||
|
# to g+w so that pictures can be uploaded to netbox.
|
||||||
|
RUN mkdir static && chmod g+w static media
|
||||||
|
|
||||||
ENTRYPOINT [ "/opt/netbox/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/opt/netbox/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
CMD ["gunicorn", "-c /etc/netbox/config/gunicorn_config.py", "netbox.wsgi"]
|
CMD ["gunicorn", "-c /etc/netbox/config/gunicorn_config.py", "netbox.wsgi"]
|
||||||
|
@ -7,6 +7,7 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
- netbox-worker
|
- netbox-worker
|
||||||
env_file: env/netbox.env
|
env_file: env/netbox.env
|
||||||
|
user: '101'
|
||||||
volumes:
|
volumes:
|
||||||
- ./startup_scripts:/opt/netbox/startup_scripts:z,ro
|
- ./startup_scripts:/opt/netbox/startup_scripts:z,ro
|
||||||
- ./initializers:/opt/netbox/initializers:z,ro
|
- ./initializers:/opt/netbox/initializers:z,ro
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
umask 002
|
||||||
|
|
||||||
# wait shortly and then run db migrations (retry on error)
|
# wait shortly and then run db migrations (retry on error)
|
||||||
while ! ./manage.py migrate 2>&1; do
|
while ! ./manage.py migrate 2>&1; do
|
||||||
|
Loading…
Reference in New Issue
Block a user