|
gitea/kompass/pipeline/head There was a failure building this commit
Details
|
2 years ago | |
|---|---|---|
| docker | 3 years ago | |
| documentation | 2 years ago | |
| jdav_web | 2 years ago | |
| .dockerignore | 3 years ago | |
| .gitignore | 2 years ago | |
| .gitmodules | 4 years ago | |
| Jenkinsfile | 3 years ago | |
| Makefile | 3 years ago | |
| README.md | 2 years ago | |
| requirements.txt | 3 years ago | |
README.md
kompass
This repository has the purpose to develop a webapplication that can be used by JDAV to send newsletters, manage user lists and keep material lists up to date. As this repository is also meant to be a base for exchange during development, feel free to contribute ideas in form of edits to this README, issues, landmarks, projects, wiki entries, ...
Documentation
The first raw version of the documentation can be found in . > documentation > README.md.
Docker
In the docker subfolder, there are docker-compose.yamls for development and production use. For the development
version, no further setup is needed.
Production
In production, the docker setup needs an external database. The exact access credentials are configured in the respective docker.env files.
Useful stuff
Reset database for certain app
The following can be useful in case that automatic migrations throw errors.
- delete everything in the migrations folder except for
__init__.py. - drop into my MySQL console and do: `DELETE FROM django_migrations WHERE app='my_app'``
- while at the MySQL console, drop all of the tables associated with my_app.
- re-run
./manage.py makemigrations my_app- this generates a 0001_initial.py file in my migrations folder. - run
./manage migrate my_app- I expect this command to re-build all my tables, but instead it says: "No migrations to apply."
Development Notes
Information
- default user as defined in step 3 Development Setup > docker
Development Setup
docker
# 1. Clone repository (see above)
# 1.2 Load Submodules
git submodule update --init
# 2. Install dependencies (docker, docker compose)
# 3. Create default (super)user
docker compose exec master bash -c "cd jdav_web && python3 manage.py createsuperuser"
# 4. Setup development environment
export GID=${GID}
export UID=${UID}
# 5. Start docker compose
cd docker/development
docker compose up -d
Description:
- to 2.: The docker container should habe the same Userrights as the developing machine
Known Issues
-
When excuting
docker compose up -dfrom development docker-compose.yaml=> ERROR [master 6/7] RUN groupadd -g kasimir && useradd -g -u -m -d /app kasimir 0.2s ------ > [master 6/7] RUN groupadd -g kasimir && useradd -g -u -m -d /app kasimir: 0.141 groupadd: invalid group ID 'kasimir' ------ failed to solve: process "/bin/sh -c groupadd -g $GID $USER && useradd -g $GID -u $UID -m -d /app $USER" did not complete successfully: exit code: 3- This error gets raised if step 2 Development Setup > docker is skipped