Add static site

main
mat ess 2022-08-09 00:31:25 -04:00
parent 369d612fb4
commit 9f5f41539f
3 changed files with 64 additions and 0 deletions

13
static/Caddyfile Normal file
View File

@ -0,0 +1,13 @@
{
# fly.io handles HTTPS for us
auto_https off
}
http://static-mat-services.fly.dev/ {
redir https://mat.services/
}
:8080 {
root * /var/www
file_server
}

13
static/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM nixos/nix:latest
WORKDIR /code
RUN nix \
--extra-experimental-features nix-command \
--extra-experimental-features flakes \
build git+https://git.mat.services/mat/mat.services
FROM caddy:latest
COPY Caddyfile /etc/caddy/Caddyfile
COPY --from=0 /code/result /var/www
RUN caddy

38
static/fly.toml Normal file
View File

@ -0,0 +1,38 @@
# fly.toml file generated for static-mat-services on 2022-08-08T01:01:25-04:00
app = "static-mat-services"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[[env]]
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
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"