Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rights Engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Polaris
Rights Engine
Commits
4b607871
Commit
4b607871
authored
2 months ago
by
Benjamin Ledel
Browse files
Options
Downloads
Patches
Plain Diff
* fix tests
parent
9f3242d8
No related branches found
No related tags found
No related merge requests found
Pipeline
#1640303
failed
2 months ago
Stage: test
Stage: build
Stage: deploy
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docs/docs/deployment.md
+0
-12
0 additions, 12 deletions
docs/docs/deployment.md
src/Dockerfile
+5
-2
5 additions, 2 deletions
src/Dockerfile
src/entrypoint.sh
+7
-0
7 additions, 0 deletions
src/entrypoint.sh
src/providers/tests.py
+0
-1
0 additions, 1 deletion
src/providers/tests.py
with
12 additions
and
15 deletions
docs/docs/deployment.md
+
0
−
12
View file @
4b607871
...
...
@@ -42,12 +42,6 @@ docker compose ps
After that you should be able to visit http://localhost:8004/ and see the rights engine.
### Migrate rights-engine database (only required once after first start) and create mongo db index
```
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 && python3 manage.py create_mongo_index'
```
### Migrate analytics-engine database (only required once after first start)
```
bash
...
...
@@ -227,12 +221,6 @@ See section `Installing Traefik`
$
docker compose up
-d
```
#### 7. Migrate DB
```
console
$
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'
```
### Analytics Engine VM setup
#### 1. Clone deployment repository
...
...
This diff is collapsed.
Click to expand it.
src/Dockerfile
+
5
−
2
View file @
4b607871
...
...
@@ -69,7 +69,10 @@ RUN cd frontend && npm run build
ENV
VIRTUAL_ENV=/env
ENV
PATH=/env/bin:$PATH
# Gunicorn Server
CMD
["gunicorn", "--bind", ":80", "--workers", "3", "--timeout", "240", "--access-logfile", "-", "--error-logfile", "-", "backend.wsgi"]
COPY
entrypoint.sh /entrypoint.sh
RUN
chmod
+x /entrypoint.sh
# Use entrypoint script to start the container
ENTRYPOINT
["/entrypoint.sh"]
EXPOSE
80
This diff is collapsed.
Click to expand it.
src/entrypoint.sh
0 → 100644
+
7
−
0
View file @
4b607871
#!/bin/sh
echo
"Running database migrations and role setup..."
python manage.py check_and_apply_migrations
echo
"Starting Gunicorn server..."
exec
gunicorn
--bind
:80
--workers
3
--timeout
240
--access-logfile
-
--error-logfile
- backend.wsgi
This diff is collapsed.
Click to expand it.
src/providers/tests.py
+
0
−
1
View file @
4b607871
...
...
@@ -23,7 +23,6 @@ class ProviderTestCase(TestCase):
normal_user
=
CustomUser
.
objects
.
create_user
(
self
.
test_user_email
,
self
.
test_user_password
)
provider_user
=
CustomUser
.
objects
.
create_user
(
self
.
test_provider_email
,
self
.
test_provider_password
)
assign_role
(
provider_user
,
'
provider
'
)
assign_role
(
normal_user
,
'
user
'
)
assign_role
(
provider_user
,
'
provider_manager
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment