Move everything in place and add containerfile

trivernis 1 year ago
parent 5b7fc1c22d
commit b42702640a
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -0,0 +1,3 @@
node_modules
.git
build

@ -1,6 +1,6 @@
{ {
"useTabs": true, "useTabs": true,
"singleQuote": true, "singleQuote": false,
"trailingComma": "none", "trailingComma": "none",
"printWidth": 100, "printWidth": 100,
"plugins": ["prettier-plugin-svelte"], "plugins": ["prettier-plugin-svelte"],

@ -0,0 +1,23 @@
FROM docker.io/node:19.5.0-alpine AS builder
# install dependencies
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# Copy all local files into the image.
COPY . .
RUN npm run build
###
# Only copy over the Node pieces we need
# ~> Saves 35MB
###
FROM docker.io/nginx:alpine
WORKDIR /app
COPY --from=builder /app/build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
CMD ["nginx", "-g", "daemon off;"]

@ -1,50 +0,0 @@
<html>
<head>
<title>No Chromium</title>
<link rel="stylesheet" href="style.css"></link>
</head>
<body>
<center class="banner">
<h1>No Chromium</h1>
<h2>Do not use Chromium</h2>
<h3>Use a different web browser</h3>
</center>
<section class="content">
<h2>What is Chromium?</h2>
<p>
Chromium is a web browser developed by Google. Many modern web browsers
use its codebase and extened upon it, for example:
</p>
<ul>
<li>Google Chrome</li>
<li>Opera</li>
<li>Microsoft Edge</li>
<li>Brave Browser</li>
</ul>
<a href="https://en.wikipedia.org/wiki/Chromium_(web_browser)">more...</a>
<h2>Why is this a bad thing?</h2>
<p>
Chromium based browsers dominate the market. This means that any changes
Google makes to the Chromium code base are also present in the browsers that build on it.
As Chromium based browsers are the majority, websites have to adapt.
This also forces non chromium browsers like Firefox to implement these changes.
This gives Google the power to steer the web in a direction they benefit from the most.
</p>
<h2>Examples</h2>
<ul>
<li>WebIntegrity</li>
<li>Widevine</li>
<li style="color: red">TODO...</li>
</ul>
<h2>What can I do</h2>
<p>
You should use alternative browsers like <a href="https://www.mozilla.org/en-US/firefox/">Firefox</a>
or, even better, <a href="https://librewolf.net/">LibreWolf</a>
</p>
</section>
</body>
</html>

@ -0,0 +1,37 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
listen [::]:80;
server_name localhost;
index index.html index.htm;
location / {
root /usr/share/nginx/html;
try_files $uri$args $uri$args/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}

681
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -12,20 +12,24 @@
"format": "prettier --plugin-search-dir . --write ." "format": "prettier --plugin-search-dir . --write ."
}, },
"devDependencies": { "devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.20.4", "@sveltejs/kit": "^1.20.4",
"@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0", "@typescript-eslint/parser": "^5.45.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.28.0", "eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0", "eslint-plugin-svelte": "^2.30.0",
"postcss": "^8.4.27",
"prettier": "^2.8.0", "prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1", "prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.0.5", "svelte": "^4.0.5",
"svelte-check": "^3.4.3", "svelte-check": "^3.4.3",
"tailwindcss": "^3.3.3",
"tslib": "^2.4.1", "tslib": "^2.4.1",
"typescript": "^5.0.0", "typescript": "^5.0.0",
"vite": "^4.4.2" "vite": "^4.4.2",
"@sveltejs/adapter-static": "^2.0.2"
}, },
"type": "module" "type": "module",
"dependencies": {}
} }

@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

@ -1,18 +0,0 @@
<html>
<head>
<title>No Chromium</title>
<link rel="stylesheet" href="style.css"></link>
</head>
<body>
<div class="container">
<div class="banner centered">
<center>
<h1>No Chromium</h1>
<h2>This website does not accept chromium based browsers</h2>
<h3>Use a different web browser</h3>
<h4><a href="index.html">Why?</a></h4>
</center>
</div>
</div>
</body>
</html>

@ -17,6 +17,3 @@ body {
height: 100%; height: 100%;
} }
.centered {
margin: auto;
}

@ -0,0 +1,5 @@
<script>
import "../app.css";
</script>
<slot/>

@ -0,0 +1,2 @@
export const csr = false;
export const prerender = true;

@ -1,2 +1,42 @@
<h1>Welcome to SvelteKit</h1> <center class="banner">
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p> <h1>No Chromium</h1>
<h2>Do not use Chromium</h2>
<h3>Use a different web browser</h3>
</center>
<section class="content">
<h2>What is Chromium?</h2>
<p>
Chromium is a web browser developed by Google. Many modern web browsers
use its codebase and extened upon it, for example:
</p>
<ul>
<li>Google Chrome</li>
<li>Opera</li>
<li>Microsoft Edge</li>
<li>Brave Browser</li>
</ul>
<a href="https://en.wikipedia.org/wiki/Chromium_(web_browser)">more...</a>
<h2>Why is this a bad thing?</h2>
<p>
Chromium based browsers dominate the market. This means that any changes
Google makes to the Chromium code base are also present in the browsers that build on it.
As Chromium based browsers are the majority, websites have to adapt.
This also forces non chromium browsers like Firefox to implement these changes.
This gives Google the power to steer the web in a direction they benefit from the most.
</p>
<h2>Examples</h2>
<ul>
<li>WebIntegrity</li>
<li>Widevine</li>
<li style="color: red">TODO...</li>
</ul>
<h2>What can I do</h2>
<p>
You should use alternative browsers like <a href="https://www.mozilla.org/en-US/firefox/">Firefox</a>
or, even better, <a href="https://librewolf.net/">LibreWolf</a>
</p>
</section>

@ -0,0 +1,10 @@
<div class="container">
<div class="banner centered">
<center>
<h1>No Chromium</h1>
<h2>This website does not accept chromium based browsers</h2>
<h3>Use a different web browser</h3>
<h4><a href="/">Why?</a></h4>
</center>
</div>
</div>

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-auto'; import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite'; import { vitePreprocess } from '@sveltejs/kit/vite';
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */

@ -0,0 +1,9 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ["./src/**/*.{htm,js,svelte,ts}"],
theme: {
extend: {},
},
plugins: [],
}
Loading…
Cancel
Save