3.1 KiB
Dokploy + Forgejo Deployment
This repo is set up as one Dockerized multisite Astro app. The build creates seven static sites and Nginx serves the correct one based on the incoming subdomain.
Sites
| Host | Static output | Content collection |
|---|---|---|
research.neeldhara.blog |
dist/research |
src/content/research |
vibes.neeldhara.blog |
dist/vibes |
src/content/vibes |
puzzles.neeldhara.blog |
dist/puzzles |
src/content/puzzles |
reflections.neeldhara.blog |
dist/reflections |
src/content/reflections |
poetry.neeldhara.blog |
dist/poetry |
src/content/poetry |
reviews.neeldhara.blog |
dist/reviews |
src/content/reviews |
art.neeldhara.blog |
dist/art |
src/content/art |
Each site has its own root feed at /rss.xml, for example:
https://research.neeldhara.blog/rss.xmlhttps://puzzles.neeldhara.blog/rss.xml
Local Commands
Build all sites:
npm run build
Build one site:
BLOG_SITE=puzzles npm run build:site
Run one site locally:
BLOG_SITE=research npm run dev:site
Build the production container locally:
docker compose build
Forgejo Setup
- Create an empty Forgejo repository, for example
neeldhara/blogs. - Point this local repo at Forgejo:
git remote set-url origin <forgejo-ssh-or-https-url>
git push -u origin main
- Enable Forgejo Actions if you want CI. The workflow in
.forgejo/workflows/build.ymlrunsnpm ciandnpm run buildon pushes and pull requests.
Forgejo Actions uses GitHub-Actions-like workflow syntax, but it is not identical to GitHub Actions. Keep this workflow intentionally simple unless the runner setup is known.
Dokploy Setup
Use the Docker Compose deployment path.
- In Dokploy, create a new Compose app.
- Connect it to the Forgejo repository. If Dokploy cannot access Forgejo directly, add a deploy key or use the repository HTTPS URL with credentials configured in Dokploy.
- Use the repository root as the build context.
- Use
docker-compose.ymlfrom this repo. - Route all seven domains to the
blogsservice on port80. - Enable HTTPS certificates for each domain in Dokploy.
The container builds all seven sites with npm run build. Nginx reads the Host header and serves the matching directory using deploy/nginx.conf.
DNS
Point these DNS records at the Dokploy host:
research.neeldhara.blog
vibes.neeldhara.blog
puzzles.neeldhara.blog
reflections.neeldhara.blog
poetry.neeldhara.blog
reviews.neeldhara.blog
art.neeldhara.blog
Use A records if pointing directly at the server IP, or CNAME records if you front Dokploy with another canonical hostname.
Verification
After deployment:
curl -I https://research.neeldhara.blog/
curl -I https://research.neeldhara.blog/rss.xml
curl -I https://puzzles.neeldhara.blog/100-prisoners/
curl -I https://puzzles.neeldhara.blog/rss.xml
Expected result: 200 OK for each.