diff --git a/monolith/README.md b/monolith/README.md index 1e989f7..b088b33 100644 --- a/monolith/README.md +++ b/monolith/README.md @@ -1,7 +1,7 @@ # Olomana - All in One -This is the one-dockerfile version of olomana containing the stable "production" containers. -Better than going module by module but don't let that stop you. -Run everything with a simple `docker-compose down && docker system prune && docker-compose up -d` +This is the one-dockerfile version of olomana containing the stable "production" containers. +Better than going module by module but don't let that stop you. +Run everything with a simple `docker-compose down && docker system prune && docker-compose up -d` Run one thing with a simple `docker-compose up serviceName` ## Setup @@ -13,7 +13,7 @@ Run one thing with a simple `docker-compose up serviceName` ##### Files Create/Fill in the following files in a `traefik/` directory under this one using the provided templates: - `traefik.toml` -- `traefik-dynamic.toml`. +- `traefik-dynamic.toml`. The file `traefik/acme.json` will be generated on first run. Make sure it eventually gets permission code 600. You might need to create a blank file before the first run. @@ -22,7 +22,7 @@ In addition to the above files, make sure the docker socket is mounted: - `/var/run/docker.sock:/var/run/docker.sock:ro` #### References -https://doc.traefik.io/traefik/getting-started/quick-start/ +https://doc.traefik.io/traefik/getting-started/quick-start/ https://doc.traefik.io/traefik/user-guides/docker-compose/basic-example/ ### Code-Server @@ -34,12 +34,12 @@ Mount the persistant storage somewhere. - `/pwspool/software/code-server/config:/config` ##### Metadata -Re-roll hashed passwords. +Re-roll hashed passwords. ./olomana.ini:/etc/grafana/grafana.ini #### References -https://docs.linuxserver.io/images/docker-code-server/ -https://coder.com/docs/code-server/latest/install#docker -https://hub.docker.com/r/linuxserver/code-server +https://docs.linuxserver.io/images/docker-code-server/ +https://coder.com/docs/code-server/latest/install#docker +https://hub.docker.com/r/linuxserver/code-server https://github.com/coder/code-server/blob/main/docs/FAQ.md#can-i-store-my-password-hashed ### Grafana @@ -63,5 +63,9 @@ To set up the data source in grafana to point to prometheus, you would refer to #### References https://grafana.com/docs/grafana/latest/setup-grafana/installation/docker/ +### Homepage +#### Instructions +##### Build +Test build with `docker-compose build homepage`. diff --git a/monolith/docker-compose.yml b/monolith/docker-compose.yml index d5f278a..8aabe38 100644 --- a/monolith/docker-compose.yml +++ b/monolith/docker-compose.yml @@ -57,7 +57,7 @@ services: depends_on: - node_exporter - prometheus - networks: + networks: - grafana - traefik user: "1003" @@ -104,3 +104,15 @@ services: labels: - traefik.enable=false + homepage: + image: homepage + container_name: homepage + build: homepage/ + restart: unless-stopped + networks: + - traefik + labels: + - traefik.http.routers.homepage.rule=Host(`www.whitney.rip`) + - traefik.http.routers.homepage.tls=true + - traefik.http.routers.homepage.tls.certresolver=lets-encrypt + - traefik.http.services.homepage.loadbalancer.server.port=80 diff --git a/monolith/homepage/Dockerfile b/monolith/homepage/Dockerfile new file mode 100644 index 0000000..a766deb --- /dev/null +++ b/monolith/homepage/Dockerfile @@ -0,0 +1,9 @@ +FROM nginx:alpine + +COPY nginx/nginx.conf /etc/nginx/nginx.conf +COPY website /usr/share/nginx/html + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] + diff --git a/monolith/homepage/nginx/nginx.conf b/monolith/homepage/nginx/nginx.conf new file mode 100644 index 0000000..f18f499 --- /dev/null +++ b/monolith/homepage/nginx/nginx.conf @@ -0,0 +1,15 @@ +events { + worker_connections 1024; +} + +http { + server { + listen 81; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html; + } + } +} \ No newline at end of file diff --git a/monolith/homepage/website/about.html b/monolith/homepage/website/about.html new file mode 100644 index 0000000..ebf043d --- /dev/null +++ b/monolith/homepage/website/about.html @@ -0,0 +1,47 @@ + +
+ + +Experience the ultimate web service tailored just for you.
+ Learn More +"${quoteData.text}" - ${quoteData.author}
`; + quoteElement.innerHTML = html; + } else { + quoteSection.innerHTML = `${failureMessageQOTD}
`; + } + } catch (error) { + console.error('Error rendering Quote of the Day:', error); + quoteSection.innerHTML = `${failureMessageQOTD}
`; + } +} + +console.log("Thanks for checking out PWS!"); +document.addEventListener('DOMContentLoaded', renderQOTD); diff --git a/monolith/homepage/website/services.html b/monolith/homepage/website/services.html new file mode 100644 index 0000000..5b15243 --- /dev/null +++ b/monolith/homepage/website/services.html @@ -0,0 +1,105 @@ + + + + +Check out some of the PWS services!
+I usually host code on Github, but for personal projects or my own IP, I self host. Some repos are mirrored to Github.
+Personal notebook hosting stuff like my grocery list and anything I need to keep track of in the moment. UI is not too bad on both mobile and on desktop.
+This was a coding project that my dad and I worked on during covid. He wanted to do some data analysis to fact check what was reported on about the covid rates. I wanted some practice with hosting web applications on PWS v1, and hosted the covid tracker website for him on PWS.
+The website renders various charts, tables, and dashboards by interest. It additionally has a few "Checker" utilities to compare cases across cities and availability within hospitals.
+Unfortunately, as of 2024, the US government website we scraped data for has stopped sharing information, and unfortunately this marks the end for this project. However, we still run it on PWS with the most recent batch of data.
+Some stretch goals for this project include caching with Nginx, or converting it to a different framework like Observable.
+I host a personal photo gallery of memories that I'd like to remember. Photoprism makes a great open source(!) solution for doing this that is better than most other comparable projects. Its features list is rather long, and can give you a pretty decent Google Photos impression.
+There are a few one-of websites that I host off of PWS. One is my Recipes Website, a ad-less, bloat-less recipes website that actually tells you how to cook something instead of trying to sell you on a cookbook or something. This was written around the time that ChatGPT was becoming a household name, and this was a great project to start to learn some of the capabilities on.
+Some other sites include my personal website (where I blog on some of these projects), and, of course, this PWS website!
+At one point, when creating discord servers for special interest groups I was a part of, I found that moderation and automation were a problem with the default discord server owner experience.
+I tried using a paid discord bot to solve some of these problems, and eventually liked it enough to purchase a lifetime subscription. However, that bot's owners started to lock features away under additional tiers and I became unhappy.
+Just unhappy enought to sit down and learn how to use the Discord Api. With the help of the Discord API for Python, and ChatGPT by my side, I have started a repository containing some of the bots and features I have written for them. It's a nice, fun way to add functionality to a service that some of my friends choose to congregate on.
+Every few winters, people get stuck inside due to rain or snow and want to play some games. In the past, PWS has hosted a minecraft server to scratch that itch. Third party plugins like Dynmap allowed us to elevate the experience by hosting a live-updating server map, which is where the screenshot comes from.
+