Compare commits

...

5 Commits

Author SHA1 Message Date
beb9a26512 updates README with new Podman instructions 2026-01-09 10:01:42 +00:00
00f793c53b Revert "WIP sign on contact form"
This reverts commit 9f85d2f1b3.
2026-01-09 09:27:36 +00:00
9f85d2f1b3 WIP sign on contact form 2026-01-08 22:30:25 +00:00
d8d2e94008 does nothing when compiling image assets 2026-01-08 22:16:58 +00:00
d9824e60a5 Revert "manually installs sharp"
This reverts commit 3966da7bc5.
2026-01-08 22:16:11 +00:00
5 changed files with 50 additions and 8 deletions

View File

@@ -10,17 +10,35 @@ Structure:
└── infrastructure: The infrastructure of my website as code
```
## Running
## Running with Podman
To run with Docker or Podman:
These instructions will probably work with Docker, too: just substitute `podman`
for `docker` in all the commands.
To run with Podman, first set up your environment variables. Copy `example.env`
to `.env` and edit the values accordingly.
Then, create the `remote_smtp_password` secret, storing the password for the
remote SMTP server which will send the contact emails on behalf of the website.
```bash
docker build -t joeac-net .
docker run joeac-net [port]:4321
sudo podman secret create remote_smtp_password /path/to/remote/smtp/password
```
To run with Node:
Now build and start the containers:
```bash
sudo podman-compose build && sudo podman-compose up -d
```
## Running on the host machine
To run on the host machine, first, as before, set up your environment variables
by copying `example.env` to `.env` and editing the values as appropriate.
```bash
npm run start
```
Note that emails may not work locally without further setup. These instructions
are of course woefully incomplete.

20
example.env Executable file
View File

@@ -0,0 +1,20 @@
# The username for authenticating to the local SMTP server
# Recommended to be the same as REMOTE_SMTP_USER, else the remote may reject it
LOCAL_SMTP_USER=
# The envelope-from used by the local SMTP server
# Recommended to be the same as REMOTE_SMTP_USER, else the remote may reject it
LOCAL_SMTP_ENVELOPE_FROM=
# The host of the remote SMTP server, e.g. smtp.gmail.com
REMOTE_SMTP_HOST=
# The port of the remote SMTP server: usually 25, 465, or 587
REMOTE_SMTP_PORT=
# The username for authenticating to the remote SMTP server
# Usually the email address which will be sending the contact emails
REMOTE_SMTP_USER=me@joeac.net
# The email address where contact emails will be sent
CONTACT_MAILBOX=me@joeac.net

View File

@@ -1,4 +1,4 @@
import { defineConfig, envField } from "astro/config";
import { defineConfig, envField, passthroughImageService } from "astro/config";
import db from "@astrojs/db";
import mdx from "@astrojs/mdx";
import node from "@astrojs/node";
@@ -30,6 +30,9 @@ export default defineConfig({
CONTACT_MAILBOX: envField.string({ context: "server", access: "secret" }),
},
},
image: {
service: passthroughImageService(),
},
site: "https://joeac.net",
integrations: [db(), mdx(), sitemap()],
});

View File

@@ -14,7 +14,6 @@
"astro": "^5.1.1",
"markdown-it": "^14.1.0",
"nodemailer": "^7.0.11",
"sharp": "^0.34.5",
"typescript": "^5.4.3"
},
"devDependencies": {
@@ -1539,6 +1538,7 @@
"resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz",
"integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==",
"license": "MIT",
"optional": true,
"engines": {
"node": ">=18"
}
@@ -4332,6 +4332,7 @@
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
"license": "Apache-2.0",
"optional": true,
"engines": {
"node": ">=8"
}
@@ -7794,6 +7795,7 @@
"integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==",
"hasInstallScript": true,
"license": "Apache-2.0",
"optional": true,
"dependencies": {
"@img/colour": "^1.0.0",
"detect-libc": "^2.1.2",

View File

@@ -20,7 +20,6 @@
"astro": "^5.1.1",
"markdown-it": "^14.1.0",
"nodemailer": "^7.0.11",
"sharp": "^0.34.5",
"typescript": "^5.4.3"
},
"devDependencies": {