-
Notifications
You must be signed in to change notification settings - Fork 0
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
add docker services #15
Conversation
5540160
to
16ef288
Compare
a835f45
to
95de0ce
Compare
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.
The build is failing
backend/poetry.lock
Outdated
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.
why we are adding this file? the poetry.toml ahould be enough
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.
it is equivalent to package-lock.json, that is, it guarantees the precise installation of dependency versions, so for stability we must include it in versioning as well
@@ -9,6 +9,8 @@ readme = "README.md" | |||
python = "^3.10" | |||
django = "^5.0.6" | |||
djangorestframework = "^3.15.2" | |||
gunicorn = "^22.0.0" |
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.
why are we adding this?
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.
we will use gunicorn
as a server for the Django application
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.
but the django already have a server I think, it's just run poetry run python3 manage.py run server
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.
Django server is a dev-only tool that make the development straight forward, it is not a "real server"
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.
why we don't use a .env file?
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.
Oops, this shouldn't be here. This is a docker solution for secrets, you can read more about it in this doc
97941ce
to
02c46bc
Compare
exit 0 | ||
fi | ||
|
||
exec gunicorn kernelCI.wsgi:application "$@" |
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.
we should run django here, not gunicorn poetry run python3 manage.py run server`
- add get_json env_var, a function that looks for environment variables that can be in json format or not; - use get_json_env_var to set ALLOWED_HOSTS. # Please enter the commit message for your changes. Lines starting
02c46bc
to
28089bb
Compare
Description
Add docker-compose.yml creating 3 services:
Related Issues
How to test it
Create secret files:
mkdir -p backend/runtime/secrets uuidgen > backend/runtime/secrets/postgres_password_secret
Startup the services with
Make a request to the proxy, it should return the default Django content as we don't have any custom endpoints for now