Compare commits
21 Commits
145228b4b6
...
main
Author | SHA1 | Date |
---|---|---|
Roberto Alsina | 63d518ebce | |
Roberto Alsina | 6dd63cedcc | |
Roberto Alsina | 9e6421e78b | |
Roberto Alsina | abe544af95 | |
Roberto Alsina | b8a4eb83e7 | |
Roberto Alsina | 3fce8c34a1 | |
Roberto Alsina | a3b304a631 | |
Roberto Alsina | 6522dd7a05 | |
Roberto Alsina | 6bc3eae255 | |
Roberto Alsina | da89bf9b4f | |
Roberto Alsina | 9c8d023a56 | |
Roberto Alsina | 5c86eb9366 | |
Roberto Alsina | 96da710831 | |
Roberto Alsina | dbd12a5c7b | |
Roberto Alsina | 404eb0e66f | |
Roberto Alsina | 5982eae329 | |
Roberto Alsina | 7ca1c5f7c4 | |
Roberto Alsina | ef9cacb363 | |
Roberto Alsina | f888300c8e | |
Roberto Alsina | 92011375fd | |
Roberto Alsina | 89a5eaecfa |
|
@ -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 . ./
|
||||
|
||||
|
|
|
@ -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}}
|
||||
|
|
45
fly.toml
45
fly.toml
|
@ -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
|
||||
|
|
130
nginx.conf
130
nginx.conf
|
@ -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/;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue