Skip to content
Snippets Groups Projects
Commit 5964c1e2 authored by Benjamin Ledel's avatar Benjamin Ledel
Browse files

* fix doku / local single docker compose file

parent 5db63091
Branches
No related tags found
No related merge requests found
Pipeline #916668 failed
......@@ -67,6 +67,11 @@ Rename or copy the sample configuration. Please change all passwords in the conf
cp .env.sample .env
```
At the first run, create the database with the following command:
```bash
docker compose exec -it rights-engine sh -c 'python3 manage.py sqlflush | sed s/TRUNCATE/DROP\ TABLE\ IF\ EXISTS/g | python3 manage.py dbshell && echo DROP\ TABLE\ IF\ EXISTS\ django_migrations\; | python3 manage.py dbshell && python3 manage.py migrate && python3 manage.py loaddata fixtures/initial_db.json'
```
Now you can start the rights engine with the following command
```bash
docker compose up -d
......@@ -86,6 +91,11 @@ cd analytics-engine
cp .env.sample .env
```
At the first run, you need to seed the database with the following command
```bash
docker compose down && docker compose up -d && sleep 30 && docker compose exec -it scheduler sh -c 'scheduler create-db' && docker compose exec -it scheduler sh -c 'scheduler read-configs'
```
Now you can start the analytics engine with the following command
```bash
docker compose up -d
......
......@@ -10,7 +10,7 @@ LRS_HOST=http://learninglocker.digitallearning.gmbh:8080
LRS_TOKEN=CHANGE_ME
MONGO_USER=root
MONGO_PASSWORT=CHANGE_ME
LRS_CONNECTION_STRING=mongodb://root:CHANGE_ME@127.0.0.1:27017
LRS_CONNECTION_STRING=mongodb://root:CHANGE_ME@mongodb_container:27017
LRS_MONGO_DB_NAME=lrs
DATA_DISCLOSURE_EXPIRATION=30
DATA_DISCLOSURE_LOCATION=/usr/src/app/backend/data_disclosure_zips
......
......@@ -35,6 +35,7 @@ services:
depends_on:
- database
- redis_db
- mongodb_container
volumes:
- ".env:/usr/src/app/backend/.env"
- "./id_rsa.pub:/usr/src/app/backend/id_rsa.pub"
......@@ -51,6 +52,7 @@ services:
depends_on:
- database
- redis_db
- mongodb_container
volumes:
- ".env:/usr/src/app/backend/.env"
- "./id_rsa.pub:/usr/src/app/backend/id_rsa.pub"
......@@ -67,6 +69,7 @@ services:
- database
- redis_db
- beat
- mongodb_container
volumes:
- ".env:/usr/src/app/backend/.env"
- "./id_rsa.pub:/usr/src/app/backend/id_rsa.pub"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment