Merge pull request #589 from tobiasge/user-unit

Fix #586: Use user name instead of userid
This commit is contained in:
Christian Mäder 2021-10-06 17:25:47 +02:00 committed by GitHub
commit daaea77144
No account linked to committer's email address
4 changed files with 5 additions and 4 deletions

View File

@ -94,6 +94,7 @@ WORKDIR /opt/netbox/netbox
# Must set permissions for '/opt/netbox/netbox/media' directory # Must set permissions for '/opt/netbox/netbox/media' directory
# to g+w so that pictures can be uploaded to netbox. # to g+w so that pictures can be uploaded to netbox.
RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \ RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
&& chown -R unit:root media /opt/unit/ \
&& chmod -R g+w media /opt/unit/ \ && chmod -R g+w media /opt/unit/ \
&& cd /opt/netbox/ && /opt/netbox/venv/bin/python -m mkdocs build \ && cd /opt/netbox/ && /opt/netbox/venv/bin/python -m mkdocs build \
--config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \ --config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \

View File

@ -9,7 +9,7 @@ services:
env_file: env/netbox.env env_file: env/netbox.env
environment: environment:
SKIP_STARTUP_SCRIPTS: ${SKIP_STARTUP_SCRIPTS-false} SKIP_STARTUP_SCRIPTS: ${SKIP_STARTUP_SCRIPTS-false}
user: '101' user: 'unit:root'
volumes: volumes:
- ./startup_scripts:/opt/netbox/startup_scripts:z,ro - ./startup_scripts:/opt/netbox/startup_scripts:z,ro
- ./${INITIALIZERS_DIR-initializers}:/opt/netbox/initializers:z,ro - ./${INITIALIZERS_DIR-initializers}:/opt/netbox/initializers:z,ro

View File

@ -8,7 +8,7 @@ services:
- redis-cache - redis-cache
- netbox-worker - netbox-worker
env_file: env/netbox.env env_file: env/netbox.env
user: '101' user: 'unit:root'
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

View File

@ -52,5 +52,5 @@ exec unitd \
--log /dev/stdout \ --log /dev/stdout \
--state /opt/unit/state/ \ --state /opt/unit/state/ \
--tmp /opt/unit/tmp/ \ --tmp /opt/unit/tmp/ \
--user 101 \ --user unit \
--group 0 --group root