-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Uipa containerization #105
Conversation
I've tested this on OS X and fedora 40 so it should be cross platform compatible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on my local VSCode and default Github codespaces ( which uses server http://0.0.0.0:8000/ ). Both worked great for me.
@kobebuckley , can this replace PR #46 or do we need to do more to get codespaces working? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well up to bringing up the front page of the dev website but clicking on links results in errors:
- TemplateDoesNotExist
- Requests
- Public Agencies
- Login
- Search for requests
- Search for information
- relation "django_redirect" does not exist
- About (top and bottom of front page)
- Help (top of front page)
- FAQ (bottom of front page)
- Terms of Use (bottom of front page)
- Privacy Statement (bottom of front page)
A. TemplateDoesNotExist
B. STATICFILES_DIRS setting does not exist.
The dev settings needs to be fixed. |
Also, the elasticsearch server URL isn't correct as show by this error:
I think that this needs to be changed in the Dev settings:
The |
Yeah, the froide code doesn't get packaged (e.g. python setup.py sdist) correctly in alpine and debian and possibly elsewhere. I'm looking into seeing why that is.
I don't think that's a important concern for now. The other STATICFILES_DIRS that django looks for are present. |
I'd prefer to change that through an env injection in the docker compose rather than modifying the config files within the container. I believe there's a bug that prevents the code from picking it up from the env though so that'll need to be fixed. |
@russtoku the template and ES issues should be fixed now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the dev website does come up, it doesn't have an admin user and seed data (FOI laws, juridictions, public bodies, public body tags, and flatpages). If this state is OK, then we're good to go. However, I think that it's not helpful enough to encourage new contributors. I think that we can do better.
See the How the database is seeded docs.
BTS, an admin user can be created by loading the data from a fixture instead of interactively with "python manage.py createsuperuser".
OK with me to merge but I didn't test the set up in a GitHub Codespace. |
This PR has the changes and files needed to run the uipa website using docker/podman compose. You'll need to build the uipa image using
docker build -f Dockerfile . -t uipa_backend:0.10 --platform=linux/amd64
and then runningdocker compose -f docker-compose.local.yml up
should bring everything up. The uipa website should be available athttp://127.0.0.1:8000
after a few minutes. The uipa container uses alpine and runs the website using django 4.2.15 and python 3.12.