This app helps to manage products, clients and deliveries for a community supported agriculture.
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3). See COPYING for details.
Some files that are included in this project contain work that is licensed under different licenses:
- vfs_fonts.ts in
frontend/src/assets/vfs_fonts.ts - seedling.svg by Mozilla in
frontend/public/assets/seedling.svgis licensed under CC BY 4.0
The app is deployed via Docker Compose based on compose.yaml. The following manual steps are necessary
for the first time setup:
- Check out the desired branch or tag
- Create copies of the files env files:
env-be-dev.env->env-be-prod.envenv-db-dev.env->env-db-prod.env
- Adjust the values based on your environment.
IMPORTANT: The following values should definitely be changed
- POSTGRES_PASSWORD
- POSTGRES_SECRET
- INITIAL_PASSWORD
- JWT_SECRET
- EMAIL_*
- (optional) Copy of
.env-sampleto.envand adjust the external ports for the different containers - Run
./dev/build/build-and-deploy.bash initfrom the project root to build containers locally - If everything looks fine, run
docker compose up -dto start - The website is now available at
http://localhost:8184(or the external port you have set asFRONTEND_EXTERNAL_PORTin the .env file) - Next steps: log in as admin (username:
admin, password: INITIAL_PASSWORD in theenv-be-prod.envfile), adjust your season configuration ("Konfiguration"), etc.
Optional configuration settings that may be set as environment variables for the backend:
EMAIL_ENABLED=true: Must be set in order to have emailing support. Make sure to fill out the other relevantEMAIL_*variablesEMAIL_SEND_REGISTER_CONFIRMATION=true: Send an email to the user that just filled out the registrationEMAIL_ORDER_UPDATED_BCC=internal@solawi.biz: Email address that receives a BCC of the order confirmation email whenever a user saves or updates an order
It is advised to schedule regular database backups, e.g., using cron:
0 3 * * * /path/to/repo/dev/backup/database-backup.bash
This will create backups in the folder ./database/backups which is mounted into the database container.
Also make sure to have backups of your custom .env files, especially the SECRETs.
For managing backup retention, a helper script can be found in ./dev/backup/cleanup_backups_script.sh.
You may set up a crontab rule to daily execute this script in the database container:
10 3 * * * /path/to/repo/dev/backup/database-clean-backups.bash
This should be done during a time with low expected user activity. You may consider notifying the user about planned downtimes by setting a maintenance message (Wartungshinweis) under the Text menu entry.
On the production server:
- Check out the desired branch or tag
git pullgit switch BRANCHNAMEorgit checkout v1.2.3
- Run
./dev/build/build-and-deploy.bash updatefrom the project root to build up-to-date containers locally- This will also trigger a database backup to the /backups folder in the container.
- Run
docker compose up -dto start
See dev/DEVELOPMENT for more information.