Compare commits
No commits in common. "main" and "145228b4b660bc24c8972ee32fe6fe6a77ebed0b" have entirely different histories.
main
...
145228b4b6
|
@ -7,7 +7,7 @@ COPY . ./
|
|||
FROM alpine:latest as tailscale
|
||||
WORKDIR /app
|
||||
COPY . ./
|
||||
ENV TSFILE=tailscale_1.56.1_amd64.tgz
|
||||
ENV TSFILE=tailscale_1.24.2_amd64.tgz
|
||||
RUN wget https://pkgs.tailscale.com/stable/${TSFILE} && tar xzf ${TSFILE} --strip-components=1
|
||||
COPY . ./
|
||||
|
||||
|
|
|
@ -3,12 +3,3 @@
|
|||
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,39 +1,40 @@
|
|||
# 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.
|
||||
#
|
||||
# fly.toml file generated for white-wave-7409 on 2022-05-02T16:24:11-03:00
|
||||
|
||||
app = "white-wave-7409"
|
||||
primary_region = "mia"
|
||||
kill_signal = "SIGINT"
|
||||
kill_timeout = "5s"
|
||||
|
||||
[experimental]
|
||||
auto_rollback = true
|
||||
kill_signal = "SIGINT"
|
||||
kill_timeout = 5
|
||||
processes = []
|
||||
|
||||
[deploy]
|
||||
strategy = "rolling"
|
||||
|
||||
[env]
|
||||
|
||||
[experimental]
|
||||
allowed_public_ports = [8080]
|
||||
auto_rollback = true
|
||||
|
||||
[[services]]
|
||||
protocol = "tcp"
|
||||
internal_port = 8080
|
||||
min_machines_running = 0
|
||||
protocol = "tcp"
|
||||
|
||||
[[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]]
|
||||
interval = "15s"
|
||||
timeout = "2s"
|
||||
grace_period = "1s"
|
||||
interval = "15s"
|
||||
restart_limit = 0
|
||||
timeout = "2s"
|
||||
|
|
130
nginx.conf
130
nginx.conf
|
@ -20,6 +20,7 @@ server {
|
|||
listen [::]:8080;
|
||||
|
||||
server_name git.ralsina.me;
|
||||
server_name got.ralsina.me;
|
||||
|
||||
location / {
|
||||
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:3000;
|
||||
|
@ -31,132 +32,3 @@ 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