Compare commits

...

21 Commits

Author SHA1 Message Date
Roberto Alsina 63d518ebce Gotify (working) 2024-04-30 13:45:59 -03:00
Roberto Alsina 6dd63cedcc Gotify 2024-04-30 13:17:10 -03:00
Roberto Alsina 9e6421e78b newer tailscale 2024-01-15 11:11:39 -03:00
Roberto Alsina abe544af95 No more code-server in this proxy 2023-07-13 16:11:29 -03:00
Roberto Alsina b8a4eb83e7 Move code server to salma 2023-07-13 10:36:58 -03:00
Roberto Alsina 3fce8c34a1 Fix nombres redirect 2023-06-05 10:22:00 -03:00
Roberto Alsina a3b304a631 Return 200 in OPTIONS with the proper headers for faas 2023-06-04 12:49:47 -03:00
Roberto Alsina 6522dd7a05 upgraded to v2 2023-05-16 12:54:39 -03:00
Roberto Alsina 6bc3eae255 Add covers 2023-05-16 12:53:36 -03:00
Roberto Alsina da89bf9b4f Add snips 2023-05-16 12:40:14 -03:00
Roberto Alsina 9c8d023a56 Add code.ralsina.me 2023-04-22 23:09:21 -03:00
Roberto Alsina 5c86eb9366 no more exposed hass 2023-04-12 11:39:25 -03:00
Roberto Alsina 96da710831 Disable external access to misskey 2023-04-11 17:39:03 -03:00
Roberto Alsina dbd12a5c7b Fix CORS for htmx 2023-02-08 14:32:47 -03:00
Roberto Alsina 404eb0e66f Added social.ralsina.me 2022-11-11 16:45:08 -03:00
Roberto Alsina 5982eae329 Add hass exposure for smartthings connection 2022-09-29 15:58:47 -03:00
Roberto Alsina 7ca1c5f7c4 Allow CORS for FaaS server 2022-07-19 14:50:07 -03:00
Roberto Alsina ef9cacb363 update readme 2022-07-16 14:45:14 -03:00
Roberto Alsina f888300c8e Add port fwd for faas 2022-07-16 14:28:47 -03:00
Roberto Alsina 92011375fd no more 2022-06-28 22:05:51 -03:00
Roberto Alsina 89a5eaecfa proxy rss server 2022-06-28 21:08:00 -03:00
4 changed files with 161 additions and 25 deletions

View File

@ -7,7 +7,7 @@ COPY . ./
FROM alpine:latest as tailscale
WORKDIR /app
COPY . ./
ENV TSFILE=tailscale_1.24.2_amd64.tgz
ENV TSFILE=tailscale_1.56.1_amd64.tgz
RUN wget https://pkgs.tailscale.com/stable/${TSFILE} && tar xzf ${TSFILE} --strip-components=1
COPY . ./

View File

@ -3,3 +3,12 @@
How I put my very own personal servers online, for free.
Details at [the blog post](http://ralsina.me/weblog/posts/the-cheapest-server.html)
When adding a new hostname, remember to create a cert for it using
`flyctl certs create hostname`
Every 90 days the tailscale auth key will expire and you need to set a new one as
a secret.
* Create the new one at https://login.tailscale.com/admin/settings/keys (MAKE IT REUSABLE)
* Configure it using flyctl secrets set TAILSCALE_AUTHKEY={{PASTEKEYHERE}}

View File

@ -1,40 +1,39 @@
# fly.toml file generated for white-wave-7409 on 2022-05-02T16:24:11-03:00
# fly.toml app configuration file generated for white-wave-7409 on 2023-05-16T12:52:57-03:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = "white-wave-7409"
primary_region = "mia"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
kill_timeout = "5s"
[experimental]
auto_rollback = true
[deploy]
strategy = "rolling"
[env]
[experimental]
allowed_public_ports = [8080]
auto_rollback = true
[[services]]
internal_port = 8080
protocol = "tcp"
internal_port = 8080
min_machines_running = 0
[[services.ports]]
port = 80
handlers = ["http"]
force_https = true
[[services.ports]]
port = 443
handlers = ["tls", "http"]
[services.concurrency]
type = "connections"
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = "443"
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
grace_period = "1s"
restart_limit = 0

View File

@ -20,7 +20,6 @@ server {
listen [::]:8080;
server_name git.ralsina.me;
server_name got.ralsina.me;
location / {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:3000;
@ -32,3 +31,132 @@ server {
internal;
}
}
server {
listen 8080;
listen [::]:8080;
server_name gotify.ralsina.me;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Allow' 'POST, GET, OPTIONS';
if ($request_method = 'OPTIONS' ) {
return 200;
}
location / {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:7777;
proxy_set_header X-Forwarded-Host $http_host;
}
location /stream {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:7777;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
error_page 403 404 500 502 503 504 /custom_50x.html;
location = /custom_50x.html {
root /usr/share/nginx/html;
internal;
}
}
server {
listen 8080;
listen [::]:8080;
server_name faas.ralsina.me;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Allow' 'POST, GET, OPTIONS';
if ($request_method = 'OPTIONS' ) {
return 200;
}
location / {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:8082;
proxy_set_header X-Forwarded-Host $http_host;
}
error_page 403 404 500 502 503 504 /custom_50x.html;
location = /custom_50x.html {
root /usr/share/nginx/html;
internal;
}
}
server {
listen 8080;
listen [::]:8080;
server_name hass.ralsina.me;
location / {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:8123;
proxy_set_header X-Forwarded-Host $http_host;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
server {
listen 8080;
listen [::]:8080;
server_name social.ralsina.me;
location / {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:3003;
proxy_set_header X-Forwarded-Host $http_host;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
server {
listen 8080;
listen [::]:8080;
server_name snips.ralsina.me;
location / {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:8091 ;
proxy_set_header X-Forwarded-Host $http_host;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
server {
listen 8080;
listen [::]:8080;
server_name covers.ralsina.me;
return 301 https://ralsina.me/stories/covers/;
}
server {
listen 8080;
listen [::]:8080;
server_name nombres.ralsina.me;
return 301 https://ralsina.me/stories/nombres/;
}