---
title: Deployment
---

The site is deployed on Coolify, a self-hosted Platform-As-A-Service running on my VPS.

Coolify internally uses Caddy as a proxy, so any projects/apps I deploy automatically get a subdomain with https.

For continuous deployment, I have set up a webhook, so that as soon as a commit is pushed to the repository (which is only necessary for code changes now, not for vocabulary updates), a rebuild is automatically triggered. Within about 90 seconds, the site updates to the new version. 

If there are any errors in deployment, it just reverts to the previous working deploy.

For posterity, here's the Dockerfile that allows this Astro/Starlight project to build:

```dockerfile
FROM node:lts AS runtime
WORKDIR /app

COPY package*.json ./
RUN npm install

COPY . .

RUN npm run build

ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321

# DATABASE_URL will be provided as an environment variable at runtime
# Set in Coolify or via docker run -e DATABASE_URL=...

CMD node ./dist/server/entry.mjs
```