From 3e5efaf71183af7f69bc4ecb0adb78033a0e01a9 Mon Sep 17 00:00:00 2001 From: Matthew Tran Date: Mon, 11 Sep 2023 00:16:44 +0000 Subject: [PATCH] add http website --- README.md | 2 +- compose.yml | 4 +--- website/Dockerfile | 18 +++++++++++++----- website/entry.sh | 3 +++ website/{main => html}/bg.js | 0 website/{main => html}/fade.js | 0 website/{main => html}/imgs/bg0.jpg | Bin website/{main => html}/imgs/bg1.jpg | Bin website/{main => html}/imgs/bg10.jpg | Bin website/{main => html}/imgs/bg11.jpg | Bin website/{main => html}/imgs/bg12.jpg | Bin website/{main => html}/imgs/bg13.jpg | Bin website/{main => html}/imgs/bg2.jpg | Bin website/{main => html}/imgs/bg3.jpg | Bin website/{main => html}/imgs/bg4.jpg | Bin website/{main => html}/imgs/bg5.jpg | Bin website/{main => html}/imgs/bg6.jpg | Bin website/{main => html}/imgs/bg7.jpg | Bin website/{main => html}/imgs/bg8.jpg | Bin website/{main => html}/imgs/bg9.jpg | Bin .../imgs/favicons/android-chrome-192x192.png | Bin .../imgs/favicons/android-chrome-512x512.png | Bin .../imgs/favicons/apple-touch-icon.png | Bin .../imgs/favicons/browserconfig.xml | 0 .../imgs/favicons/favicon-16x16.png | Bin .../imgs/favicons/favicon-32x32.png | Bin .../{main => html}/imgs/favicons/favicon.ico | Bin .../imgs/favicons/mstile-150x150.png | Bin .../imgs/favicons/safari-pinned-tab.svg | 0 .../imgs/favicons/site.webmanifest | 0 website/{main => html}/imgs/social.jpg | Bin website/{main => html}/index.html | 0 website/{main => html}/sitemap.xml | 0 website/{main => html}/style.css | 0 website/matthewtran.com | 13 +++++++++++++ 35 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 website/entry.sh rename website/{main => html}/bg.js (100%) rename website/{main => html}/fade.js (100%) rename website/{main => html}/imgs/bg0.jpg (100%) rename website/{main => html}/imgs/bg1.jpg (100%) rename website/{main => html}/imgs/bg10.jpg (100%) rename website/{main => html}/imgs/bg11.jpg (100%) rename website/{main => html}/imgs/bg12.jpg (100%) rename website/{main => html}/imgs/bg13.jpg (100%) rename website/{main => html}/imgs/bg2.jpg (100%) rename website/{main => html}/imgs/bg3.jpg (100%) rename website/{main => html}/imgs/bg4.jpg (100%) rename website/{main => html}/imgs/bg5.jpg (100%) rename website/{main => html}/imgs/bg6.jpg (100%) rename website/{main => html}/imgs/bg7.jpg (100%) rename website/{main => html}/imgs/bg8.jpg (100%) rename website/{main => html}/imgs/bg9.jpg (100%) rename website/{main => html}/imgs/favicons/android-chrome-192x192.png (100%) rename website/{main => html}/imgs/favicons/android-chrome-512x512.png (100%) rename website/{main => html}/imgs/favicons/apple-touch-icon.png (100%) rename website/{main => html}/imgs/favicons/browserconfig.xml (100%) rename website/{main => html}/imgs/favicons/favicon-16x16.png (100%) rename website/{main => html}/imgs/favicons/favicon-32x32.png (100%) rename website/{main => html}/imgs/favicons/favicon.ico (100%) rename website/{main => html}/imgs/favicons/mstile-150x150.png (100%) rename website/{main => html}/imgs/favicons/safari-pinned-tab.svg (100%) rename website/{main => html}/imgs/favicons/site.webmanifest (100%) rename website/{main => html}/imgs/social.jpg (100%) rename website/{main => html}/index.html (100%) rename website/{main => html}/sitemap.xml (100%) rename website/{main => html}/style.css (100%) create mode 100644 website/matthewtran.com diff --git a/README.md b/README.md index 0c97007..63c5772 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Stuff that's deployed on [matthewtran.com](matthewtran.com). Tested on Ubuntu Server 22.04.3 LTS. Currently running the following services. - website -- gitea (`git.matthewtran.com`) +- gitea ([git.matthewtran.com](git.matthewtran.com)) - monerod - p2pool (`xmrig -o matthewtran.com:3333`) - minecraft diff --git a/compose.yml b/compose.yml index c337594..1cef099 100644 --- a/compose.yml +++ b/compose.yml @@ -2,12 +2,10 @@ services: website: restart: always build: website/. - # entrypoint: ["/bin/sh", "/home/matt/entry.sh"] + entrypoint: ["/bin/sh", "/root/entry.sh"] ports: - "80:80" - "443:443" - # volumes: - # - ./monerod/.bitmonero:/home/matt/.bitmonero monerod: restart: always build: monerod/. diff --git a/website/Dockerfile b/website/Dockerfile index 3f20166..b383aec 100644 --- a/website/Dockerfile +++ b/website/Dockerfile @@ -1,10 +1,18 @@ FROM ubuntu:22.04 RUN apt-get update && apt-get upgrade -# RUN apt-get install -y wget +RUN apt-get install -y git nginx -RUN useradd -m matt -USER matt -WORKDIR /home/matt +RUN rm /etc/nginx/sites-enabled/default +RUN ln -sf /dev/stdout /var/log/nginx/access.log +RUN ln -sf /dev/stderr /var/log/nginx/error.log -# TODO everything else +COPY matthewtran.com /etc/nginx/sites-available +RUN ln -s /etc/nginx/sites-available/matthewtran.com /etc/nginx/sites-enabled/matthewtran.com +COPY html /var/www/matthewtran.com/html + +WORKDIR /root +COPY entry.sh ./ + +# TODO gitea +# TODO disable registration except admin diff --git a/website/entry.sh b/website/entry.sh new file mode 100644 index 0000000..57630cf --- /dev/null +++ b/website/entry.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +nginx -g 'daemon off;' diff --git a/website/main/bg.js b/website/html/bg.js similarity index 100% rename from website/main/bg.js rename to website/html/bg.js diff --git a/website/main/fade.js b/website/html/fade.js similarity index 100% rename from website/main/fade.js rename to website/html/fade.js diff --git a/website/main/imgs/bg0.jpg b/website/html/imgs/bg0.jpg similarity index 100% rename from website/main/imgs/bg0.jpg rename to website/html/imgs/bg0.jpg diff --git a/website/main/imgs/bg1.jpg b/website/html/imgs/bg1.jpg similarity index 100% rename from website/main/imgs/bg1.jpg rename to website/html/imgs/bg1.jpg diff --git a/website/main/imgs/bg10.jpg b/website/html/imgs/bg10.jpg similarity index 100% rename from website/main/imgs/bg10.jpg rename to website/html/imgs/bg10.jpg diff --git a/website/main/imgs/bg11.jpg b/website/html/imgs/bg11.jpg similarity index 100% rename from website/main/imgs/bg11.jpg rename to website/html/imgs/bg11.jpg diff --git a/website/main/imgs/bg12.jpg b/website/html/imgs/bg12.jpg similarity index 100% rename from website/main/imgs/bg12.jpg rename to website/html/imgs/bg12.jpg diff --git a/website/main/imgs/bg13.jpg b/website/html/imgs/bg13.jpg similarity index 100% rename from website/main/imgs/bg13.jpg rename to website/html/imgs/bg13.jpg diff --git a/website/main/imgs/bg2.jpg b/website/html/imgs/bg2.jpg similarity index 100% rename from website/main/imgs/bg2.jpg rename to website/html/imgs/bg2.jpg diff --git a/website/main/imgs/bg3.jpg b/website/html/imgs/bg3.jpg similarity index 100% rename from website/main/imgs/bg3.jpg rename to website/html/imgs/bg3.jpg diff --git a/website/main/imgs/bg4.jpg b/website/html/imgs/bg4.jpg similarity index 100% rename from website/main/imgs/bg4.jpg rename to website/html/imgs/bg4.jpg diff --git a/website/main/imgs/bg5.jpg b/website/html/imgs/bg5.jpg similarity index 100% rename from website/main/imgs/bg5.jpg rename to website/html/imgs/bg5.jpg diff --git a/website/main/imgs/bg6.jpg b/website/html/imgs/bg6.jpg similarity index 100% rename from website/main/imgs/bg6.jpg rename to website/html/imgs/bg6.jpg diff --git a/website/main/imgs/bg7.jpg b/website/html/imgs/bg7.jpg similarity index 100% rename from website/main/imgs/bg7.jpg rename to website/html/imgs/bg7.jpg diff --git a/website/main/imgs/bg8.jpg b/website/html/imgs/bg8.jpg similarity index 100% rename from website/main/imgs/bg8.jpg rename to website/html/imgs/bg8.jpg diff --git a/website/main/imgs/bg9.jpg b/website/html/imgs/bg9.jpg similarity index 100% rename from website/main/imgs/bg9.jpg rename to website/html/imgs/bg9.jpg diff --git a/website/main/imgs/favicons/android-chrome-192x192.png b/website/html/imgs/favicons/android-chrome-192x192.png similarity index 100% rename from website/main/imgs/favicons/android-chrome-192x192.png rename to website/html/imgs/favicons/android-chrome-192x192.png diff --git a/website/main/imgs/favicons/android-chrome-512x512.png b/website/html/imgs/favicons/android-chrome-512x512.png similarity index 100% rename from website/main/imgs/favicons/android-chrome-512x512.png rename to website/html/imgs/favicons/android-chrome-512x512.png diff --git a/website/main/imgs/favicons/apple-touch-icon.png b/website/html/imgs/favicons/apple-touch-icon.png similarity index 100% rename from website/main/imgs/favicons/apple-touch-icon.png rename to website/html/imgs/favicons/apple-touch-icon.png diff --git a/website/main/imgs/favicons/browserconfig.xml b/website/html/imgs/favicons/browserconfig.xml similarity index 100% rename from website/main/imgs/favicons/browserconfig.xml rename to website/html/imgs/favicons/browserconfig.xml diff --git a/website/main/imgs/favicons/favicon-16x16.png b/website/html/imgs/favicons/favicon-16x16.png similarity index 100% rename from website/main/imgs/favicons/favicon-16x16.png rename to website/html/imgs/favicons/favicon-16x16.png diff --git a/website/main/imgs/favicons/favicon-32x32.png b/website/html/imgs/favicons/favicon-32x32.png similarity index 100% rename from website/main/imgs/favicons/favicon-32x32.png rename to website/html/imgs/favicons/favicon-32x32.png diff --git a/website/main/imgs/favicons/favicon.ico b/website/html/imgs/favicons/favicon.ico similarity index 100% rename from website/main/imgs/favicons/favicon.ico rename to website/html/imgs/favicons/favicon.ico diff --git a/website/main/imgs/favicons/mstile-150x150.png b/website/html/imgs/favicons/mstile-150x150.png similarity index 100% rename from website/main/imgs/favicons/mstile-150x150.png rename to website/html/imgs/favicons/mstile-150x150.png diff --git a/website/main/imgs/favicons/safari-pinned-tab.svg b/website/html/imgs/favicons/safari-pinned-tab.svg similarity index 100% rename from website/main/imgs/favicons/safari-pinned-tab.svg rename to website/html/imgs/favicons/safari-pinned-tab.svg diff --git a/website/main/imgs/favicons/site.webmanifest b/website/html/imgs/favicons/site.webmanifest similarity index 100% rename from website/main/imgs/favicons/site.webmanifest rename to website/html/imgs/favicons/site.webmanifest diff --git a/website/main/imgs/social.jpg b/website/html/imgs/social.jpg similarity index 100% rename from website/main/imgs/social.jpg rename to website/html/imgs/social.jpg diff --git a/website/main/index.html b/website/html/index.html similarity index 100% rename from website/main/index.html rename to website/html/index.html diff --git a/website/main/sitemap.xml b/website/html/sitemap.xml similarity index 100% rename from website/main/sitemap.xml rename to website/html/sitemap.xml diff --git a/website/main/style.css b/website/html/style.css similarity index 100% rename from website/main/style.css rename to website/html/style.css diff --git a/website/matthewtran.com b/website/matthewtran.com new file mode 100644 index 0000000..1512c1d --- /dev/null +++ b/website/matthewtran.com @@ -0,0 +1,13 @@ +server { + listen 80; + listen [::]:80; + + server_name matthewtran.com www.matthewtran.com; + + root /var/www/matthewtran.com/html; + index index.html; + + location / { + try_files $uri $uri/ =404; + } +}