This commit is contained in:
nora 2024-07-27 10:22:53 +02:00
parent 6d47ea67f0
commit e6e0400c54
11 changed files with 29 additions and 71 deletions

14
debug.html Normal file
View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nora's server</title>
</head>
<body>
<h1>congrats, you landed on my server (0% NixOS) directly!?</h1>
<p>sorry, but there isn't anything cool here. this is <b>my</b> infra, you are not allowed here.</p>
<p>if you do want to be allowed here, then uh.. still no.</p>
<p>:3</p>
</body>
</html>

View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euxo pipefail
cd "$(dirname "$(realpath "$0")")/.."
./deploy/smoke-tests.sh
colmena apply --on dns1
./deploy/smoke-tests.sh
colmena apply --on dns2
./deploy/smoke-tests.sh

View file

@ -7,7 +7,6 @@ let
dns2 = host "128.140.3.7" "2a01:4f8:c2c:d616::";
vps1 = host "161.97.165.1" null;
in
{
SOA = {

View file

@ -1,7 +1,5 @@
---
- name: Generic setup
ansible.builtin.import_playbook: ./basic-setup.yml
- name: VPS 1
ansible.builtin.import_playbook: ./vps1.yml
- name: VPS 2
ansible.builtin.import_playbook: ./vps2.yml

View file

@ -36,8 +36,8 @@
ansible.builtin.shell: |
set -euo pipefail
sudo rm -f /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
rm -f /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
# todo: show ok/changed
args:

View file

@ -1,6 +1,4 @@
vps:
hosts:
vps1:
ansible_host: vps1.nilstrieb.dev
vps2:
ansible_host: vps2.nilstrieb.dev

View file

@ -1,18 +0,0 @@
---
- name: VPS 1 setup
hosts: vps1
gather_facts: false
tasks:
#####
# END: docker compose up!
#####
# We want this to be last so that all app-specific config has been done.
- name: Copy .env
ansible.builtin.copy:
dest: "/apps/.env"
src: "../secrets/vps1.env"
mode: "u=r,g=r,o=r"
- name: Docker compose up! 🚀
community.docker.docker_compose_v2:
project_src: /apps
state: "present"

View file

@ -1,34 +0,0 @@
{
email nilstrieb@gmail.com
}
# https://gist.github.com/ryanburnette/d13575c9ced201e73f8169d3a793c1a3
(cors) {
@cors_preflight{args.0} method OPTIONS
@cors{args.0} header Origin {args.0}
handle @cors_preflight{args.0} {
header {
Access-Control-Allow-Origin "{args.0}"
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
Access-Control-Allow-Credentials "false"
Access-Control-Allow-Headers "${args.1}"
Access-Control-Max-Age "86400"
defer
}
respond "" 204
}
handle @cors{args.0} {
header {
Access-Control-Allow-Origin "{args.0}"
Access-Control-Expose-Headers *
defer
}
}
}
vps1.nilstrieb.dev {
root * /var/www/html/debug
file_server
}

View file

@ -1,4 +0,0 @@
## ports
- `5010`: uptime
- `5011`: openolat

View file

@ -1,8 +0,0 @@
version: "3.8"
services:
eepy:
container_name: eepy
restart: always
image: alpine:latest
entrypoint: sleep infinity