diff --git a/.gitignore b/.gitignore index 805baf8..cad7045 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,18 @@ *.mp3 -root/secrets -root/foundry_secrets.json -home/certbot/conf/* -!home/certbot/conf/.gitkeep -home/dir2cast/getID3 -home/dir2cast/temp -home/foundry/Data/modules/* -!home/foundry/Data/modules/asc -home/foundry/Data/systems/* -home/foundry/Data/worlds/* -home/foundry/container_cache -home/yacht/data.sqlite -home/filebrowser/database.db +apps/certbot/conf/* +!apps/certbot/conf/.gitkeep +apps/dir2cast/getID3 +apps/dir2cast/temp +apps/foundry/Data/modules/* +!apps/foundry/Data/modules/asc +apps/foundry/Data/systems/* +apps/foundry/Data/worlds/* +apps/foundry/foundry_secrets.json +apps/foundry/container_cache +apps/yacht/data.sqlite +apps/filebrowser/database.db **/.idea/** -home/vouch/config.yml +apps/vouch/config.yml design/ # General diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1537b5f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule "apps/dir2cast"] + path = apps/dir2cast + url = https://github.com/ben-xo/dir2cast +[submodule "apps/rolladvantage"] + path = apps/rolladvantage + url = https://gitea.ascorrea.com/asc/rolladvantage.git +[submodule "scripts/docker-install"] + path = scripts/docker-install + url = https://github.com/docker/docker-install +[submodule "scripts/localhost-ssl"] + path = scripts/localhost-ssl + url = https://gist.github.com/jonsamp/587b78b7698be7c7fd570164a586e6b7 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ee20f10 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM nginx +RUN echo $UID + +RUN mkdir -p /var/www/dir2cast +RUN chown -R www-data:www-data /var/www/dir2cast + +COPY apps/dir2cast/dir2cast.php /var/www/dir2cast +COPY apps/dir2cast/getID3 /var/www/dir2cast/getID3 +RUN ln -s /var/www/podcast/dir2cast.ini /var/www/dir2cast +RUN ln -s /var/www/podcast/ /var/www/dir2cast \ No newline at end of file diff --git a/home/certbot/.gitkeep b/README.md similarity index 100% rename from home/certbot/.gitkeep rename to README.md diff --git a/home/certbot/conf/.gitkeep b/apps/certbot/.gitkeep similarity index 100% rename from home/certbot/conf/.gitkeep rename to apps/certbot/.gitkeep diff --git a/home/certbot/www/.gitkeep b/apps/certbot/conf/.gitkeep similarity index 100% rename from home/certbot/www/.gitkeep rename to apps/certbot/conf/.gitkeep diff --git a/home/filebrowser/.gitkeep b/apps/certbot/www/.gitkeep similarity index 100% rename from home/filebrowser/.gitkeep rename to apps/certbot/www/.gitkeep diff --git a/apps/dir2cast b/apps/dir2cast new file mode 160000 index 0000000..178c977 --- /dev/null +++ b/apps/dir2cast @@ -0,0 +1 @@ +Subproject commit 178c977b3f772f8b40795fadf4d17c621cd7206e diff --git a/home/filebrowser/srv/.gitkeep b/apps/filebrowser/.gitkeep similarity index 100% rename from home/filebrowser/srv/.gitkeep rename to apps/filebrowser/.gitkeep diff --git a/apps/filebrowser/Dockerfile b/apps/filebrowser/Dockerfile new file mode 100644 index 0000000..bea543f --- /dev/null +++ b/apps/filebrowser/Dockerfile @@ -0,0 +1,4 @@ +FROM filebrowser/filebrowser +COPY docker-entrypoint.sh /usr/local/bin +RUN ln -s /usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] \ No newline at end of file diff --git a/apps/filebrowser/docker-entrypoint.sh b/apps/filebrowser/docker-entrypoint.sh new file mode 100755 index 0000000..4f9cd57 --- /dev/null +++ b/apps/filebrowser/docker-entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/sh +USERS_DIR=/srv/filebrowser/files/users/ + +echo "Initializing container" +/filebrowser config init +/filebrowser config set --auth.method=$AUTH_METHOD --auth.header=$AUTH_HEADER + +mkdir -p $USERS_DIR + + +USER=anthonyscorrea@gmail.com +/filebrowser users add $USER "" --perm.admin +/filebrowser users update $USER --scope "users/$USER" +mkdir -p $USERS_DIR$USER +ln -s /srv/foundry/Data/modules $USERS_DIR$USER/foundry-modules +ln -s /srv/foundry/Data/worlds $USERS_DIR$USER/foundry-worlds +ln -s /srv/foundry/Data/systems $USERS_DIR$USER/foundry-systems +ln -s /srv/metube $USERS_DIR$USER/metube +ln -s /srv/foundry/ $USERS_DIR$USER/foundry + +USER=bcrase@gmail.com +/filebrowser users add $USER "" +/filebrowser users update $USER --scope "users/$USER" +mkdir -p $USERS_DIR$USER +ln -s /srv/foundry/Data/worlds $USERS_DIR$USER/foundry-worlds +ln -s /srv/metube $USERS_DIR$USER/metube + +USER=acorre20@gmail.com +/filebrowser users add $USER "" +/filebrowser users update $USER --scope "users/$USER" +mkdir -p $USERS_DIR$USER +ln -s /srv/foundry/Data/worlds $USERS_DIR$USER/foundry-worlds + +/filebrowser users add $USER "" +/filebrowser users update $USER --scope "users/$USER" +mkdir -p $USERS_DIR$USER + + +exec "/filebrowser" \ No newline at end of file diff --git a/apps/filebrowser/filebrowser.json b/apps/filebrowser/filebrowser.json new file mode 100644 index 0000000..3e9acc2 --- /dev/null +++ b/apps/filebrowser/filebrowser.json @@ -0,0 +1,8 @@ +{ + "port": 80, + "baseURL": "/filebrowser", + "address": "", + "log": "stdout", + "database": "/srv/filebrowser/database.db", + "root": "/srv/filebrowser/files" +} \ No newline at end of file diff --git a/apps/filebrowser/filebrowser.nginx.conf b/apps/filebrowser/filebrowser.nginx.conf new file mode 100644 index 0000000..428cf56 --- /dev/null +++ b/apps/filebrowser/filebrowser.nginx.conf @@ -0,0 +1,20 @@ +location /filebrowser/ { + auth_request /vouch/validate; + auth_request_set $auth_resp_x_vouch_user $upstream_http_x_vouch_user; + proxy_set_header X-Vouch-User $auth_resp_x_vouch_user; + add_header X-Vouch-User $auth_resp_x_vouch_user; + client_max_body_size 2048m; + proxy_read_timeout 86400s; + proxy_send_timeout 86400s; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_http_version 1.1; + proxy_redirect off; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass http://filebrowser:80/filebrowser/; + } \ No newline at end of file diff --git a/home/foundry/.gitkeep b/apps/foundry/.gitkeep similarity index 100% rename from home/foundry/.gitkeep rename to apps/foundry/.gitkeep diff --git a/apps/foundry/Dockerfile b/apps/foundry/Dockerfile new file mode 100644 index 0000000..84578dd --- /dev/null +++ b/apps/foundry/Dockerfile @@ -0,0 +1 @@ +FROM felddy/foundryvtt:release \ No newline at end of file diff --git a/home/foundry/container_cache/.gitkeep b/apps/foundry/container_cache/.gitkeep similarity index 100% rename from home/foundry/container_cache/.gitkeep rename to apps/foundry/container_cache/.gitkeep diff --git a/apps/foundry/foundry.nginx.conf b/apps/foundry/foundry.nginx.conf new file mode 100644 index 0000000..437230b --- /dev/null +++ b/apps/foundry/foundry.nginx.conf @@ -0,0 +1,24 @@ +location ~ ^/foundry/$ { + return 301 /foundry/game/; + } + + +location /foundry/ { + auth_request /vouch/validate; + auth_request_set $auth_resp_x_vouch_user $upstream_http_x_vouch_user; + proxy_set_header X-Vouch-User $auth_resp_x_vouch_user; + # Set proxy headers + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # These are important to support WebSockets + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + # may need to set + # auth_request_set $auth_resp_x_vouch_user $upstream_http_x_vouch_user; + # in this bock as per https://github.com/vouch/vouch-proxy/issues/26#issuecomment-425215810 + # set user header (usually an email) + proxy_pass http://foundry:30000/foundry/; +} + diff --git a/apps/foundry/foundry_secrets_sample.json b/apps/foundry/foundry_secrets_sample.json new file mode 100644 index 0000000..6d762d8 --- /dev/null +++ b/apps/foundry/foundry_secrets_sample.json @@ -0,0 +1,3 @@ +{ +"foundry_admin_key": "" +} \ No newline at end of file diff --git a/home/foundry/Config/options.json b/apps/foundry/options.json similarity index 93% rename from home/foundry/Config/options.json rename to apps/foundry/options.json index d382fc7..164bf0e 100644 --- a/home/foundry/Config/options.json +++ b/apps/foundry/options.json @@ -1,7 +1,7 @@ { "awsConfig": null, "compressStatic": false, - "dataPath": "/data", + "dataPath": "/srv/foundry", "fullscreen": false, "hostname": null, "language": "en.core", diff --git a/home/html/01sw.html b/apps/html/01sw.html similarity index 100% rename from home/html/01sw.html rename to apps/html/01sw.html diff --git a/home/html/50x.html b/apps/html/50x.html similarity index 100% rename from home/html/50x.html rename to apps/html/50x.html diff --git a/home/html/assets/bootstrap/css/bootstrap.min.css b/apps/html/assets/bootstrap/css/bootstrap.min.css similarity index 100% rename from home/html/assets/bootstrap/css/bootstrap.min.css rename to apps/html/assets/bootstrap/css/bootstrap.min.css diff --git a/home/html/assets/bootstrap/js/bootstrap.min.js b/apps/html/assets/bootstrap/js/bootstrap.min.js similarity index 100% rename from home/html/assets/bootstrap/js/bootstrap.min.js rename to apps/html/assets/bootstrap/js/bootstrap.min.js diff --git a/home/html/assets/css/Articles-Cards-images.css b/apps/html/assets/css/Articles-Cards-images.css similarity index 100% rename from home/html/assets/css/Articles-Cards-images.css rename to apps/html/assets/css/Articles-Cards-images.css diff --git a/home/html/assets/css/Features-Cards-icons.css b/apps/html/assets/css/Features-Cards-icons.css similarity index 100% rename from home/html/assets/css/Features-Cards-icons.css rename to apps/html/assets/css/Features-Cards-icons.css diff --git a/home/html/assets/css/Navigation-Clean.css b/apps/html/assets/css/Navigation-Clean.css similarity index 100% rename from home/html/assets/css/Navigation-Clean.css rename to apps/html/assets/css/Navigation-Clean.css diff --git a/home/html/assets/css/styles.css b/apps/html/assets/css/styles.css similarity index 100% rename from home/html/assets/css/styles.css rename to apps/html/assets/css/styles.css diff --git a/home/html/assets/img/crew-of-the-kahuna-horiz.svg b/apps/html/assets/img/crew-of-the-kahuna-horiz.svg similarity index 100% rename from home/html/assets/img/crew-of-the-kahuna-horiz.svg rename to apps/html/assets/img/crew-of-the-kahuna-horiz.svg diff --git a/home/html/assets/img/discord-512.webp b/apps/html/assets/img/discord-512.webp similarity index 100% rename from home/html/assets/img/discord-512.webp rename to apps/html/assets/img/discord-512.webp diff --git a/home/html/assets/img/discord-logo-discord-icon-transparent-free-png.webp b/apps/html/assets/img/discord-logo-discord-icon-transparent-free-png.webp similarity index 100% rename from home/html/assets/img/discord-logo-discord-icon-transparent-free-png.webp rename to apps/html/assets/img/discord-logo-discord-icon-transparent-free-png.webp diff --git a/home/html/assets/img/favicon.png b/apps/html/assets/img/favicon.png similarity index 100% rename from home/html/assets/img/favicon.png rename to apps/html/assets/img/favicon.png diff --git a/apps/html/assets/img/filebrowser-logo.svg b/apps/html/assets/img/filebrowser-logo.svg new file mode 100644 index 0000000..5e78ecc --- /dev/null +++ b/apps/html/assets/img/filebrowser-logo.svg @@ -0,0 +1,147 @@ + + \ No newline at end of file diff --git a/home/html/assets/img/fvtt-solid-512.png b/apps/html/assets/img/fvtt-solid-512.png similarity index 100% rename from home/html/assets/img/fvtt-solid-512.png rename to apps/html/assets/img/fvtt-solid-512.png diff --git a/home/html/assets/img/itunes_image-1.jpg b/apps/html/assets/img/itunes_image-1.jpg similarity index 100% rename from home/html/assets/img/itunes_image-1.jpg rename to apps/html/assets/img/itunes_image-1.jpg diff --git a/home/html/assets/img/itunes_image-2.jpg b/apps/html/assets/img/itunes_image-2.jpg similarity index 100% rename from home/html/assets/img/itunes_image-2.jpg rename to apps/html/assets/img/itunes_image-2.jpg diff --git a/home/dir2cast/02ram/itunes_image.jpg b/apps/html/assets/img/itunes_image.jpg similarity index 100% rename from home/dir2cast/02ram/itunes_image.jpg rename to apps/html/assets/img/itunes_image.jpg diff --git a/home/html/assets/img/logo-blue-white.png b/apps/html/assets/img/logo-blue-white.png similarity index 100% rename from home/html/assets/img/logo-blue-white.png rename to apps/html/assets/img/logo-blue-white.png diff --git a/apps/html/assets/img/metube.png b/apps/html/assets/img/metube.png new file mode 100644 index 0000000..abd6b9d Binary files /dev/null and b/apps/html/assets/img/metube.png differ diff --git a/home/html/assets/img/podcast-art.jpg b/apps/html/assets/img/podcast-art.jpg similarity index 100% rename from home/html/assets/img/podcast-art.jpg rename to apps/html/assets/img/podcast-art.jpg diff --git a/apps/html/gm-tools/index.html b/apps/html/gm-tools/index.html new file mode 100644 index 0000000..27f9759 --- /dev/null +++ b/apps/html/gm-tools/index.html @@ -0,0 +1,40 @@ + + + +
+ + +