Skip to content

Commit daaea77

Browse files
authored
Merge pull request #589 from tobiasge/user-unit
Fix #586: Use user name instead of userid
2 parents faa1cb5 + 5679ab4 commit daaea77

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ WORKDIR /opt/netbox/netbox
9494
# Must set permissions for '/opt/netbox/netbox/media' directory
9595
# to g+w so that pictures can be uploaded to netbox.
9696
RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
97+
&& chown -R unit:root media /opt/unit/ \
9798
&& chmod -R g+w media /opt/unit/ \
9899
&& cd /opt/netbox/ && /opt/netbox/venv/bin/python -m mkdocs build \
99100
--config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \

docker-compose.test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
env_file: env/netbox.env
1010
environment:
1111
SKIP_STARTUP_SCRIPTS: ${SKIP_STARTUP_SCRIPTS-false}
12-
user: '101'
12+
user: 'unit:root'
1313
volumes:
1414
- ./startup_scripts:/opt/netbox/startup_scripts:z,ro
1515
- ./${INITIALIZERS_DIR-initializers}:/opt/netbox/initializers:z,ro

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
- redis-cache
99
- netbox-worker
1010
env_file: env/netbox.env
11-
user: '101'
11+
user: 'unit:root'
1212
volumes:
1313
- ./startup_scripts:/opt/netbox/startup_scripts:z,ro
1414
- ./initializers:/opt/netbox/initializers:z,ro

docker/launch-netbox.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ exec unitd \
5252
--log /dev/stdout \
5353
--state /opt/unit/state/ \
5454
--tmp /opt/unit/tmp/ \
55-
--user 101 \
56-
--group 0
55+
--user unit \
56+
--group root

0 commit comments

Comments
 (0)