add haanmind.net
Deploy haanmind.net / deploy (push) Successful in 2s
Deploy nginx / deploy (push) Successful in 3s

This commit is contained in:
2026-03-19 11:23:53 -04:00
parent 037b78734f
commit 7e35042b71
3 changed files with 77 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
name: Deploy haanmind.net
on:
push:
branches: [main]
paths:
- 'docker/haanmind.net/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/deploy_key deploy@${{ vars.DEPLOY_HOST }} deploy-haanmind.net
+11
View File
@@ -0,0 +1,11 @@
services:
app:
image: git.timothykim.net/hantim/haanmind.net:latest
restart: unless-stopped
container_name: haanmind_net
networks:
- shared
networks:
shared:
external: true
+48
View File
@@ -0,0 +1,48 @@
# Redirect HTTP to HTTPS, bare domain to www
server {
listen 80;
listen [::]:80;
server_name haanmind.net www.haanmind.net;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://www.haanmind.net$request_uri;
}
}
# Redirect bare HTTPS domain to www
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name haanmind.net;
ssl_certificate /etc/letsencrypt/live/haanmind.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/haanmind.net/privkey.pem;
return 301 https://www.haanmind.net$request_uri;
}
# Main site
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name www.haanmind.net;
ssl_certificate /etc/letsencrypt/live/haanmind.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/haanmind.net/privkey.pem;
add_header Strict-Transport-Security "max-age=63072000; preload" always;
location / {
proxy_pass http://haanmind_net:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}