Skip to content
Snippets Groups Projects
Unverified Commit fefe7661 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Update README

parent 9f659c6e
No related branches found
No related tags found
No related merge requests found
......@@ -4,50 +4,49 @@ This is an attendance manager/tracker to ensure COVID-19 restrictions.
## Development
**IMPORTANT**: DO NOT CHANGE already commited migrations files!
Use the script `manage.sh` for local development.
```shell
$ ./manage.sh help
Managment Script Usage:
Management Script Usage:
manage.sh [COMMAND]
COMMAND:
build Build docker image for local development.
db [start|restart|stop] Start/stop local database.
makemigrations Create new migration files.
migrate Apply migrations to local database.
update_dependencies Update dependencies based in requirements.in.
build Build docker image for local development.
services [start|restart|stop] Start/stop service dependencies.
makemigrations Create new migration files.
migrate Apply migrations to local database.
update_dependencies Update dependencies based in requirements.in.
```
Build local development image with:
### Example workflow
Build local development image:
```shell
./manage.sh build
```
Run development server with:
Start service dependencies:
```shell
docker run --rm -it --name bastlibouncer \
-p 5000:5000 \
-v ${PWD}:/bastlibouncer \
-v ${PWD}/instance/config.dev.py:/bastlibouncer/instance/config.py \
bastlibouncer-dev
./manage.sh services start
```
## Upgrade dependencies
Apply database migrations:
Run the command:
```shell
docker run -it \
-v ${PWD}:/bastlibouncer \
-v ${PWD}/instance/config.dev.py:/bastlibouncer/instance/config.py \
bastlibouncer-dev \
pip-compile --output-file requirements.txt requirements.in
./manage.sh migrate
```
## How to handle database changes
Run development server:
```shell
./manage.sh run
```
TODO
\ No newline at end of file
Start developing now.
......@@ -54,7 +54,7 @@ case $1 in
echo ""
echo "COMMAND:"
echo " build Build docker image for local development."
echo " services [start|restart|stop] Start/stop local database."
echo " services [start|restart|stop] Start/stop service dependencies."
echo " makemigrations Create new migration files."
echo " migrate Apply migrations to local database."
echo " update_dependencies Update dependencies based in requirements.in."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment