What you need
- A server or computer with Docker and Docker Compose.
- For public use, a domain and a reverse proxy with HTTPS.
- SMTP access, so activation and password mails can be sent.
Docker Compose starts five containers: the proxy, the web frontend, the API server, PostgreSQL and a recipe import service.
Installation
1. Download the project and change into the compose folder.
git clone https://github.com/steve192/opencookbook
cd opencookbook/compose2. Edit the .env file. At the very least change DB_PASSWORD. The most important settings are in the next section.
3. Start Cookpal.
docker compose up -dThe app is then reachable on the port set by httpPort (default 3009). For public use, put a reverse proxy with HTTPS in front.
Important settings
| Setting | Meaning |
|---|---|
| tag | The version that is started. |
| httpPort | The port the app is reachable on (default 3009). |
| DB_PASSWORD | The database password. Change it. |
| INSTANCE_URL | The public address without /app. It is used for links in mails and shares. |
| SMTP_*, MAIL_FROM | Credentials and sender for activation and password mails. |
| LANDING_ENABLED | Shows this project page at /. Off by default, then / opens the app. |
| LEGAL_DIR | Folder with the legal texts shown in the app (default ./legal). |
| MAX_UPLOAD_SIZE_MB | The largest upload in megabytes. |
Legal texts
LEGAL_DIR holds three files: terms.html, privacy.html and imprint.html. The app shows them as terms, privacy policy and imprint.
A publicly reachable instance usually needs these texts. What they have to say depends on your country and how you run it.
The Android app with your own server
The Android app connects to your server once you enter its address as the server address in the login settings (the cog icon).
Updating
Always update all images together, because app and server of one release belong together. Set tag to the new version if needed, then:
docker compose pull && docker compose up -dA reverse proxy must pass the frontend's Cache-Control headers through unchanged, or browsers may keep showing the old version after an update.
Backups
Back up two directories: the database directory (DATABASE_MOUNT_DIR) and the images directory (IMAGES_MOUNT_DIR). It is best to stop the containers briefly before copying the database.