mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
cleanup
This commit is contained in:
parent
6d47ea67f0
commit
e6e0400c54
11 changed files with 29 additions and 71 deletions
14
debug.html
Normal file
14
debug.html
Normal 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>
|
||||
13
newinfra/nix/deploy/deploy-dns.sh
Executable file
13
newinfra/nix/deploy/deploy-dns.sh
Executable 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
|
||||
|
|
@ -7,7 +7,6 @@ let
|
|||
dns2 = host "128.140.3.7" "2a01:4f8:c2c:d616::";
|
||||
|
||||
vps1 = host "161.97.165.1" null;
|
||||
|
||||
in
|
||||
{
|
||||
SOA = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
vps:
|
||||
hosts:
|
||||
vps1:
|
||||
ansible_host: vps1.nilstrieb.dev
|
||||
vps2:
|
||||
ansible_host: vps2.nilstrieb.dev
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
## ports
|
||||
|
||||
- `5010`: uptime
|
||||
- `5011`: openolat
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
version: "3.8"
|
||||
services:
|
||||
eepy:
|
||||
container_name: eepy
|
||||
restart: always
|
||||
image: alpine:latest
|
||||
entrypoint: sleep infinity
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue