Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ jobs:
fi
done
echo "All 7 pages present in dist/"
if [ ! -f dist/_headers ]; then
echo "MISSING: dist/_headers"
exit 1
fi
49 changes: 14 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,19 @@ GitHub Actions runs on every push and pull request to `master`:
1. Prettier format check
2. Full build
3. Fail if `dist/` does not match a clean rebuild
4. Verify all 7 HTML pages are present in `dist/`
4. Verify all 7 HTML pages and `_headers` are present in `dist/`

Step 3 matters because the server serves the committed `dist/` and never runs a
Step 3 matters because Cloudflare serves the committed `dist/` and never runs a
build. Without it, `src/` and `dist/` can drift apart and CI stays green while the
live site is stale. A sibling site ran 20 months behind `master` before anyone
noticed.

## Deployment

The site runs on a Vultr VPS behind Cloudflare. Apache serves the committed
`dist/` from `/var/www/integrumsys.com/dist` — **the server never runs a build**,
so whatever is committed under `dist/` is what visitors get.

Deployment is a manual pull:

```sh
ssh linuxuser@integrumsys.com
cd /var/www/integrumsys.com
sudo git pull --ff-only origin master
```

No restart is needed; Apache reads the files on each request.
The site is a Cloudflare Worker with static assets only: Cloudflare serves the
committed `dist/` and never runs a build (`wrangler.jsonc`). Workers Builds
deploys on every push to `master`, so whatever is committed under `dist/` is
what visitors get.

A source change is only live once the rebuilt `dist/` is committed too:

Expand All @@ -81,26 +72,14 @@ npm run build
git add dist/ && git commit
```

### Server notes

- SSH is key-only; password authentication is disabled and `PermitRootLogin` is
`prohibit-password`. `linuxuser` has passwordless sudo, so that key alone is
root. Its password is deliberately left set — it is the only Vultr console
fallback if the key ever fails.
- fail2ban guards SSH with escalating bans. Before it was installed the box was
taking roughly 9,000 failed authentication attempts per day.
- ufw allows 22 and 80 from anywhere, but **443 only from Cloudflare's published
ranges**, so the origin cannot be reached directly. Refresh the ranges from
<https://www.cloudflare.com/ips-v4> and `ips-v6` if the site becomes
intermittently unreachable — Cloudflare adds ranges occasionally, and a missing
one fails for a subset of edges rather than outright.
- **Port 80 must stay open.** Certbot uses the `apache` authenticator (HTTP-01),
so restricting port 80 breaks certificate renewal — and the failure surfaces up
to 90 days later as a browser warning, with no email since Let's Encrypt
stopped expiry notifications. Closing it requires moving to DNS-01 first.
Verify any firewall or vhost change with
`sudo /snap/bin/certbot renew --dry-run` (certbot is a snap; non-interactive
SSH needs the full path).
Response headers (HSTS, CSP, framing) live in `src/_headers`, which the build
copies to `dist/_headers`. The CSP ships as `Content-Security-Policy-Report-Only`
until a pass over every page shows no violations in the browser console.

Cloudflare serves each page at its extensionless path: `/about.html` answers
with a 307 to `/about`, and `/` serves `index.html`. The internal `.html`
links still work, through that redirect. `html_handling: "none"` would keep
the `.html` paths but returns 404 for `/`.

## License

Expand Down
7 changes: 7 additions & 0 deletions dist/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), geolocation=(), microphone=(), payment=(), usb=()
Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com; font-src 'self' https://cdn.jsdelivr.net https://fonts.gstatic.com; img-src 'self' data:; connect-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; object-src 'none'
27 changes: 1 addition & 26 deletions dist/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,35 +55,10 @@ <h1 class="display-6 fw-bolder mb-3">Get in touch.</h1>
<div class="col-lg-7">
<!-- Direct email notice-->
<div class="alert mb-4" style="background-color: #e6f7f8; border: 1px solid #0e9aa7; color: #0b1220">
Form submission is being set up. Reach us directly at&nbsp;
Email us directly at&nbsp;
<a class="fw-500" href="mailto:contact@integrumsys.com" style="color: #0b7f89">contact@integrumsys.com</a>
</div>
<!-- Contact form-->
<form action="mailto:contact@integrumsys.com" method="GET">
<!-- Name-->
<div class="form-floating mb-3">
<input class="form-control" id="name" type="text" placeholder="Full name" required />
<label for="name">Full name</label>
</div>
<!-- Email-->
<div class="form-floating mb-3">
<input class="form-control" id="email" type="email" placeholder="name@example.com" required />
<label for="email">Email address</label>
</div>
<!-- Phone (optional)-->
<div class="form-floating mb-3">
<input class="form-control" id="phone" type="tel" placeholder="Phone number (optional)" />
<label for="phone">Phone number (optional)</label>
</div>
<!-- Message-->
<div class="form-floating mb-4">
<textarea class="form-control" id="message" placeholder="Message" required style="height: 10rem"></textarea>
<label for="message">Message</label>
</div>
<div class="d-grid"><button class="btn btn-primary btn-lg" type="submit">Send message</button></div>
</form>
<!-- Direct contact-->
<hr class="my-4" style="border-color: #d7dee8" />
<p class="mb-1">
<span class="font-mono small" style="color: #3b4a5e">Email</span>
&nbsp;
Expand Down
1 change: 1 addition & 0 deletions scripts/render-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ module.exports = function renderAssets() {
const destPath = upath.resolve(upath.dirname(__filename), '../dist/.');

sh.cp('-R', sourcePath, destPath);
sh.cp(upath.resolve(upath.dirname(__filename), '../src/_headers'), destPath);
};
7 changes: 7 additions & 0 deletions src/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), geolocation=(), microphone=(), payment=(), usb=()
Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com; font-src 'self' https://cdn.jsdelivr.net https://fonts.gstatic.com; img-src 'self' data:; connect-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; object-src 'none'
28 changes: 1 addition & 27 deletions src/pug/contact.pug
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,10 @@ html(lang="en")
.col-lg-7
// Direct email notice
.alert.mb-4(style="background-color: #e6f7f8; border: 1px solid #0e9aa7; color: #0b1220")
| Form submission is being set up. Reach us directly at&nbsp;
| Email us directly at&nbsp;
a.fw-500(href="mailto:contact@integrumsys.com" style="color: #0b7f89") contact@integrumsys.com

// Contact form
form(action="mailto:contact@integrumsys.com" method="GET")
// Name
.form-floating.mb-3
input#name.form-control(type="text" placeholder="Full name" required)
label(for="name") Full name

// Email
.form-floating.mb-3
input#email.form-control(type="email" placeholder="name@example.com" required)
label(for="email") Email address

// Phone (optional)
.form-floating.mb-3
input#phone.form-control(type="tel" placeholder="Phone number (optional)")
label(for="phone") Phone number (optional)

// Message
.form-floating.mb-4
textarea#message.form-control(placeholder="Message" required style="height: 10rem")
label(for="message") Message

.d-grid
button.btn.btn-primary.btn-lg(type="submit") Send message

// Direct contact
hr.my-4(style="border-color: #d7dee8")
p.mb-1
span.font-mono.small(style="color: #3b4a5e") Email
|
Expand Down
9 changes: 9 additions & 0 deletions wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Assets-only Worker: Cloudflare serves the committed dist/ directly.
// There is no Worker script and no build step on Cloudflare's side.
{
"name": "integrumsys-com",
"compatibility_date": "2026-11-01",
"assets": {
"directory": "./dist",
},
}
Loading