Self-host with Docker Compose

Last updated:

How do I run Commentpin with Docker Compose?

Clone the repository, copy the example settings and start the stack. Docker Compose builds the app and runs it with Postgres, a cron runner and a test inbox.

Start

git clone https://github.com/aaronyarm/website-feedback && cd website-feedback
cp .env.example .env
docker compose up -d

Open http://localhost:3000. Enter your email, then open Mailpit at http://localhost:8025 and click the sign-in link.

Back up

Back up the database and the appdata volume:

docker compose exec postgres pg_dump -U postgres website_feedback > backup.sql

The volume holds uploaded screenshots and the generated secrets. Keep both.

Update

git pull
docker compose up -d --build

Migrations run when the app starts.

Next

Put it on a server with HTTPS: running on a VPS. All settings: configuration. Then install the widget. Overview: self-host.

Frequently asked questions

Which services does the Compose file start?
app (the web app and API), postgres, cron (scheduled jobs) and mailpit (a test inbox).
Where is my data?
In two Docker volumes: pgdata for the database and appdata for screenshots and generated secrets.
Do migrations run automatically?
Yes. The app container runs database migrations every time it starts.
How do I change the port?
Set APP_PORT in .env, for example APP_PORT=8080.
How do I send real emails?
Set SMTP_HOST and the other SMTP values, or RESEND_API_KEY, in .env and restart.