diff --git a/README.md b/README.md index 7979eb0..a8c8d66 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ see Credits. | Path | Purpose | | --- | --- | | `src/App.vue` | Desktop layout — orchestrates the typewriter sequence | -| `src/Mobile.vue` | Mobile layout (used when viewport ≤ 500px) | +| `src/Mobile.vue` | Mobile/tablet layout (used when viewport ≤ 900px) | | `src/config/profile.js` | **All content lives here** — details, Markdown, animation speed, typed CSS | | `src/components/StyleEditor.vue` | Left panel: highlighted, self-typing CSS | | `src/components/ResumeEditor.vue` | Right panel: resume markdown → HTML | @@ -67,7 +67,7 @@ Requires Node ≥ 18 (built and tested on Node 24). ## Deployment -Pushed to **Gitea only** — `git.hoelee.com/hoelee/hoelee-profile`. There is no GitHub mirror. +Source of truth: **Gitea** — `git.hoelee.com/hoelee/hoelee-profile` (mirrored to GitHub). `me.hoelee.com` is served by an `nginx:alpine` container (`nginx-me.hoelee.com`) on the VPS at `41.216.187.102`, behind Traefik. The container mounts the built site read-only: @@ -84,8 +84,30 @@ npm run build rsync -av --delete dist/ root@41.216.187.102:/docker/web/me.hoelee.com/public/ ``` -The site is static — no PHP or database is used. The `php:9000` upstream in the nginx config is a -leftover from the shared web template and is not needed by this site. +Without SSH the same build can be pushed over the Portainer Docker API with a tar archive +(`PUT /api/endpoints/4/docker/containers/php-me.hoelee.com/archive?path=/var/www/html`) — that +container is the writable side of the mount. Remove stale `static/js/index-*.js` bundles in place; +do **not** delete and recreate the directory, because the read-only bind mount keeps pointing at the +old inode and nginx starts returning 403. + +### Tor mirror + +The same container is published as a Tor onion service — the unRaid `tor-server` maps +`hoeleeaiwowgndbxswegtdzoeupz7lkkechtqmurbmnpvwa4k3vyuyid.onion` to `41.216.187.102:10001`, which is +this nginx. There is no second copy of the site: one deploy updates clearnet and onion together. + +### nginx config + +`deploy/nginx/me.hoelee.com.conf` is the versioned copy of the live config (gzip on, immutable +caching for the hashed `static/` assets, SPA fallback to `index.html`). To apply: + +```bash +scp deploy/nginx/me.hoelee.com.conf root@41.216.187.102:/docker/web/me.hoelee.com/nginx/default.conf +ssh root@41.216.187.102 'docker exec nginx-me.hoelee.com nginx -t && docker exec nginx-me.hoelee.com nginx -s reload' +``` + +The site is static — no PHP or database is used. The `php:9000` sidecar is a leftover from the shared +web template and is not needed by this site. ## Credits diff --git a/deploy/nginx/me.hoelee.com.conf b/deploy/nginx/me.hoelee.com.conf new file mode 100644 index 0000000..2c47803 --- /dev/null +++ b/deploy/nginx/me.hoelee.com.conf @@ -0,0 +1,62 @@ +server { + + listen 80; + + server_name me.hoelee.com; + + root /var/www/html; + index index.html index.htm; + + client_max_body_size 100M; + + server_tokens off; + + # The site is a static Vue SPA: one HTML shell + hashed static/ assets. + # No PHP is served (the php-fpm sidecar is a leftover of the template). + + # 139 KB of JS per visit went out uncompressed before this: enable gzip. + gzip on; + gzip_vary on; + gzip_comp_level 5; + gzip_min_length 256; + gzip_proxied any; + gzip_types + text/plain + text/css + text/javascript + application/javascript + application/json + application/manifest+json + image/svg+xml + font/woff2; + + # SPA fallback: unknown paths return the shell instead of hitting a missing index.php. + location / { + try_files $uri $uri/ /index.html; + } + + # Filenames are content-hashed by Vite, so they can be cached forever. + location /static/ { + add_header Cache-Control "public, max-age=31536000, immutable"; + access_log off; + try_files $uri =404; + } + + # The shell and the icons must be revalidated so a deploy is visible immediately. + location = /index.html { + add_header Cache-Control "no-cache"; + } + + location = /robots.txt { + add_header Cache-Control "public, max-age=3600"; + } + + location = /favicon.ico { + add_header Cache-Control "public, max-age=604800"; + access_log off; + } + + location ~ /\.ht { + deny all; + } +} diff --git a/index.html b/index.html index 4295d7b..d68da84 100644 --- a/index.html +++ b/index.html @@ -23,13 +23,34 @@ html { background: #004040; color: #dedede; } @media (max-width: 900px) { html { background: #002b36; } } body { margin: 0; } + /* Boot shell: the panes are drawn by a stylesheet the app types in, so without this + the page is an empty dark rectangle for the first seconds. Rendered before the + JS module loads; Vue replaces it on mount. */ + #app > .boot { + display: flex; flex-direction: column; justify-content: center; + min-height: 100vh; padding: 0 8vw; box-sizing: border-box; + font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; + line-height: 1.5; + } + #app > .boot .n { font-size: clamp(1.1rem, 2.6vw, 1.6rem); color: #eaeaea; } + #app > .boot .r { margin-top: .4em; color: #9fd6c9; } + #app > .boot .h { margin-top: 2.2em; color: #7f9c96; font-size: .85em; } + #app > .boot .h::after { content: '_'; animation: boot-blink 1s steps(1) infinite; } + @keyframes boot-blink { 50% { opacity: 0; } } + @media (prefers-reduced-motion: reduce) { #app > .boot .h::after { animation: none; } } -
+
+
+

Mr Hoelee — Lee Teong Hoe

+

Senior Full-Stack · DevOps · AI Systems Engineer — 10+ years, remote (GMT+8)

+

rendering the resume

+
+