-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
complete full go rewrite added environment variables to control the container at runtime
- Loading branch information
1 parent
fd2a6f0
commit 99039cd
Showing
13 changed files
with
311 additions
and
154 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.idea/** | ||
.idea/** | ||
logs/** | ||
repo/** |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
Version: 1.0.0 | ||
Version: 1.0.0, 2017-03-22 | ||
This initial release happened months ago however since I am going to be making some heavy changes I figured I would tag it to maintain the point in time. | ||
Version: 2.0.0, 2018-03-18 | ||
This is almost a full re-write with many new features. The ruby script has been replaced by a go program, which will do an inital scan at start up and uses concurrency and file locking. I have added multi-stage build process for the container to bring down the final container size. I have also added controls for not enabling nginx (if file serving will be done another way and to save resouces) amd turning on debugging. |
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,9 +1,28 @@ | ||
#!/bin/bash | ||
|
||
mkdir /root/logs/repo-scanner | ||
mkdir /root/logs/nginx | ||
mkdir /root/logs/supervisord | ||
mkdir /logs/repo-scanner | ||
mkdir /logs/nginx | ||
mkdir /logs/supervisord | ||
|
||
chown nginx:nginx /root/logs/nginx | ||
chown nginx:nginx /logs/nginx | ||
|
||
chmod -R 0755 /repo | ||
|
||
if [[ "${SERVE_FILES}" == "true" ]]; then | ||
echo "Serving Files is on" | ||
cat << EOF >> /etc/supervisord.conf | ||
[program:nginx] | ||
priority=10 | ||
directory=/ | ||
command=/usr/sbin/nginx -c /etc/nginx/nginx.conf -g "daemon off;" | ||
user=root | ||
autostart=true | ||
autorestart=true | ||
stopsignal=QUIT | ||
redirect_stderr=true | ||
EOF | ||
else | ||
echo "Serving Files is off" | ||
fi | ||
|
||
exec /usr/bin/supervisord -n -c /etc/supervisord.conf |
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.
Oops, something went wrong.