-
-
Notifications
You must be signed in to change notification settings - Fork 884
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #394 from netbox-community/develop
Prepare version 1.0.0
- Loading branch information
Showing
49 changed files
with
646 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: The \#netbox-docker Slack channel | ||
url: http://slack.networktocode.com/ | ||
about: It's usually the quickest way to seek help when you're in trouble with regards to Netbox Docker. | ||
|
||
- name: Github Discussions | ||
url: https://github.com/netbox-community/netbox-docker/discussions | ||
about: This is the right place to ask questions about how to use or do certain things with Netbox Docker. | ||
|
||
- name: Have you had a look at our Wiki? | ||
url: https://github.com/netbox-community/netbox-docker/wiki | ||
about: Our wiki contains information for common problems and tips for operating Netbox Docker in production. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.27.0 | ||
1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
import importlib.util | ||
import sys | ||
|
||
|
||
def _filename(f): | ||
return f.name | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
UNIT_CONFIG="${UNIT_CONFIG-/etc/unit/nginx-unit.json}" | ||
UNIT_SOCKET="/opt/unit/unit.sock" | ||
|
||
load_configuration() { | ||
MAX_WAIT=10 | ||
WAIT_COUNT=0 | ||
while [ ! -S $UNIT_SOCKET ]; do | ||
if [ $WAIT_COUNT -gte $MAX_WAIT ]; then | ||
echo "⚠️ No control socket found; configuration will not be loaded." | ||
return 1 | ||
fi | ||
|
||
WAIT_COUNT=$((WAIT_COUNT + 1)) | ||
echo "⏳ Waiting for control socket to be created... (${WAIT_COUNT}/${MAX_WAIT})" | ||
|
||
sleep 1 | ||
done | ||
|
||
# even when the control socket exists, it does not mean unit has finished initialisation | ||
# this curl call will get a reply once unit is fully launched | ||
curl --silent --output /dev/null --request GET --unix-socket $UNIT_SOCKET http://localhost/ | ||
|
||
echo "⚙️ Applying configuration from $UNIT_CONFIG"; | ||
|
||
RESP_CODE=$(curl \ | ||
--silent \ | ||
--output /dev/null \ | ||
--write-out '%{http_code}' \ | ||
--request PUT \ | ||
--data-binary "@${UNIT_CONFIG}" \ | ||
--unix-socket $UNIT_SOCKET \ | ||
http://localhost/config | ||
) | ||
if [ "$RESP_CODE" != "200" ]; then | ||
echo "⚠️ Could no load Unit configuration" | ||
kill "$(cat /opt/unit/unit.pid)" | ||
return 1 | ||
fi | ||
|
||
echo "✅ Unit configuration loaded successfully" | ||
} | ||
|
||
load_configuration & | ||
|
||
exec unitd \ | ||
--no-daemon \ | ||
--control unix:$UNIT_SOCKET \ | ||
--pid /opt/unit/unit.pid \ | ||
--log /dev/stdout \ | ||
--state /opt/unit/state/ \ | ||
--tmp /opt/unit/tmp/ |
Oops, something went wrong.