Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if the dashboard can be installed on a different domain without issues #495

Open
stitch opened this issue Mar 5, 2024 · 8 comments
Labels
deployment enhancement New feature or request
Milestone

Comments

@stitch
Copy link
Collaborator

stitch commented Mar 5, 2024

If the dashboard is installed, make sure that there are no fixed links to domains and other non-configurable "settings". Allow disabling of logo's.

@stitch
Copy link
Collaborator Author

stitch commented Jun 18, 2024

Todo App:

  • are all admin-configuration panels visibly close to each other in /admin/
  • is the default configuration neutral and well documented (the constance documentation) no internal references
  • are all periodic tasks present and are they loaded in after installation?
  • is a user configured + account on installation?
  • is the name internet.nl not present in the frontend after installation?
  • are references to internet.nl login/password changes also / are templates also changed there?
  • are enough e-mail templates shipped in fixtures
  • are the settings in the fixtures correct and don't contain names etc?
  • do fixtures only contain the data that it must have, without logs etc?
  • is the information on admin shorthand pages extensive enough?
  • are features such as signup things that should be visible in all installations? ->
  • implement SHOW_SIGNUP_FORM in the frontend
  • make sure the CORS_ALLOWED_ORIGINS is set correctly on installation, the domain must be correct.
  • make sure the sentry settings are correct on installation = CORS_ALLOWED_ACCEPT_DOMAIN, CORS_ALLOWED_DOMAIN, SENTRY_ORGANIZATION, SENTRY_PROJECT, CSRF_TRUSTED_ORIGINS, CSRF_TRUSTED_ORIGINS_DEFAULT_DOMAIN, CSRF_TRUSTED_ORIGINS_WILDCARD_DOMAIN
  • add setting for another logo and some CSS overrides?
  • is configuration from the backend exposed to the frontend?

Todo server:

  • How to limit access to the admin interface via IP addresses (out of scope)
  • Are unique SECRET_KEY and FIELD_ENCRYPTION_KEY set during installation
  • Is creation of the first user automated or should that be done with a shell command? (fixture)

Other:

  • is there a written and up to date installation tutorial / guide?
  • Add references to the installation guide to the front page of the repository

stitch added a commit that referenced this issue Jun 18, 2024
@stitch
Copy link
Collaborator Author

stitch commented Jul 1, 2024

Removed the internet.nl/PLIS references in the backend:
image

@stitch
Copy link
Collaborator Author

stitch commented Jul 1, 2024

Removed internet.nl from the frontend (todo: remove favicon)

image

@stitch
Copy link
Collaborator Author

stitch commented Jul 1, 2024

Improved settings

image

@bwbroersma
Copy link
Collaborator

bwbroersma commented Aug 6, 2024

Don't be a @bwbroersma and RTFM in the correct branch (which is /docs/input/1_installation.rst in branch 50 for now, not yet main!).

I've got a build error:

------
 > [worker-reporting  9/16] RUN pip-sync requirements.txt requirements-deploy.txt:
0.755 Incompatible requirements found: requests-toolbelt==1.0.0 (from -r requirements-deploy.txt (line 527)) and requests-toolbelt@ git+https://github.com/requests/toolbelt@c73ad2c204a2e0cd5617a836ac536d5e06778ab0 from git+https://github.com/requests/toolbelt@c73ad2c204a2e0cd5617a836ac536d5e06778ab0 (from -r requirements.txt (line 443))
------
failed to solve: process "/bin/sh -c pip-sync requirements.txt requirements-deploy.txt" did not complete successfully: exit code: 2
Nevermind this earlier comment I made Got a got of these:
migrate-1   | django.db.utils.NotSupportedError: PostgreSQL 12 or later is required (found 11.16).
Changing the docker-compose to version 12 then of course means you will encounter:
db-1        | 2024-08-06 06:24:19.421 UTC [1] FATAL:  database files are incompatible with server
db-1        | 2024-08-06 06:24:19.421 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 11, which is not compatible with this version 12.19 (Debian 12.19-1.pgdg120+1).
Because the database was already initialized. Throwing away the containers with a `docker compose down` fixes this, which means the db path is currently not in a separate storage / bind volume, which might be a good idea (at least to have in some production documentation). Some db error during migration, that still succeeds?
migrate-1   |   Applying constance.0001_initial... OK
db-1        | 2024-08-06 06:24:56.925 UTC [84] ERROR:  relation "constance_config" does not exist at character 79
db-1        | 2024-08-06 06:24:56.925 UTC [84] STATEMENT:  INSERT INTO constance_constance ( id, key, value ) SELECT id, key, value FROM constance_config
The frontend does an exit 1:
frontend-1  | [uwsgi-static] added mapping for /static => /srv/dashboard/static
frontend-1  | *** Starting uWSGI 2.0.22 (64bit) on [Tue Aug  6 06:24:55 2024] ***
frontend-1  | compiled with version: 12.2.0 on 06 August 2024 06:15:46
frontend-1  | os: Linux-5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31)
frontend-1  | nodename: 89005eb3845f
frontend-1  | machine: x86_64
frontend-1  | clock source: unix
frontend-1  | detected number of CPU cores: 12
frontend-1  | current working directory: /
frontend-1  | detected binary path: /pyenv/bin/uwsgi
frontend-1  | !!! no internal routing support, rebuild with pcre support !!!
frontend-1  | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
frontend-1  | your memory page size is 4096 bytes
frontend-1  | invalid cheaper value: must be lower than processes
frontend-1 exited with code 1
guess some docker file is outdated?

@stitch
Copy link
Collaborator Author

stitch commented Aug 12, 2024

There was a small discrepancy in the requirements. Just fixed it and tried a fresh installation on another machine. I've also added the video and installation instructions in the readme.

@bwbroersma
Copy link
Collaborator

Like discussed in the live session:

backend-1           | invalid cheaper value: must be lower than processes
backend-1 exited with code 1

Caused by this check. More about cheaper.

Adding this to the Dockerfile fixes this:

ENV UWSGI_CHEAPER 0

I'm unsure if this is the best solution.

bwbroersma added a commit to bwbroersma/Internet.nl-dashboard that referenced this issue Aug 22, 2024
Fix uwsgi "invalid cheaper value: must be lower than processes", see internetstandards#495.
@stitch
Copy link
Collaborator Author

stitch commented Sep 11, 2024

Change the credential check url to https://batch.internet.nl/ -> "api/batch/v2/requests"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment enhancement New feature or request
Development

No branches or pull requests

2 participants