aboutsummaryrefslogtreecommitdiff
path: root/Caddyfile
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-07 11:56:36 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-07 11:56:36 -0700
commit0b7e1ae5aea05cdc5069b3edb15bd2165a2e1411 (patch)
treed883ca82a5a6a3361f36549eb703a19d9d9d4fa0 /Caddyfile
parentbuild: drop the configuration for drone (diff)
downloadfcuny.net-0b7e1ae5aea05cdc5069b3edb15bd2165a2e1411.tar.gz
ref(build): build and deploy with nix
Refactored the build of the docker image to be done with nix: the flake knows how to build the docker image, using caddy as a HTTP server. It generates a small image, with the configuration for caddy and the site generated by hugo (`nix build`). Deleted the Dockerfile since the creation is done with nix. Got rid of the deployment script since this is also done via the flake (`nix run .#deploy`).
Diffstat (limited to 'Caddyfile')
-rw-r--r--Caddyfile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Caddyfile b/Caddyfile
new file mode 100644
index 0000000..7456ef5
--- /dev/null
+++ b/Caddyfile
@@ -0,0 +1,14 @@
+{
+ http_port 8080
+ auto_https off
+}
+
+http://fcunynet.fly.dev {
+ redir https://fcuny.net
+}
+
+http://fcuny.net {
+ root * {$SITE_ROOT}
+ encode gzip
+ file_server
+}