Skip to content

Commit

Permalink
Changed entrypoint to "tini".
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasge committed Sep 13, 2021
1 parent 2926d1a commit a8b6883
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
--config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \
&& SECRET_KEY="dummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input

ENTRYPOINT [ "/opt/netbox/docker-entrypoint.sh" ]
ENTRYPOINT [ "/sbin/tini", "--" ]

CMD [ "/opt/netbox/launch-netbox.sh" ]
CMD [ "/opt/netbox/docker-entrypoint.sh", "/opt/netbox/launch-netbox.sh" ]

LABEL ORIGINAL_TAG="" \
NETBOX_GIT_BRANCH="" \
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ services:
- ./reports:/etc/netbox/reports:z,ro
- ./scripts:/etc/netbox/scripts:z,ro
- netbox-media-files:/opt/netbox/netbox/media:z
ports:
- 8080
postgres:
image: postgres:13-alpine
env_file: env/postgres.env
Expand Down
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ services:
depends_on:
- redis
- postgres
entrypoint:
- "/sbin/tini"
- "--"
command:
- /opt/netbox/venv/bin/python
- /opt/netbox/netbox/manage.py
Expand All @@ -33,9 +30,6 @@ services:
depends_on:
- redis
- postgres
entrypoint:
- "/sbin/tini"
- "--"
command:
- /opt/netbox/housekeeping.sh

Expand Down
4 changes: 2 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ test_setup() {

test_netbox_unit_tests() {
echo "⏱ Running NetBox Unit Tests"
SKIP_STARTUP_SCRIPTS=true $doco run --rm netbox ./manage.py test
$doco run --rm netbox /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py test
}

test_initializers() {
echo "🏭 Testing Initializers"
export INITIALIZERS_DIR
$doco run --rm netbox ./manage.py check
$doco run --rm netbox /opt/netbox/docker-entrypoint.sh ./manage.py check
}

test_cleanup() {
Expand Down

0 comments on commit a8b6883

Please sign in to comment.