-
Notifications
You must be signed in to change notification settings - Fork 1
Container version #11
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # fedora-36 | ||
| FROM registry.fedoraproject.org/fedora:36 | ||
|
|
||
| WORKDIR /vagrant | ||
|
|
||
| COPY requirements.txt /vagrant | ||
|
|
||
| RUN \ | ||
| dnf -y install \ | ||
| # python3 \ | ||
| sqlite \ | ||
| pip \ | ||
| gcc \ | ||
| python3-devel \ | ||
| && \ | ||
| dnf clean all | ||
|
|
||
| RUN \ | ||
| python3 -m pip install -r requirements.txt | ||
|
|
||
| COPY app_setup.sh /vagrant | ||
|
|
||
| ENTRYPOINT /bin/bash /vagrant/app_setup.sh | ||
|
|
||
| EXPOSE 8000/tcp | ||
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,16 +5,17 @@ | |
|
|
||
| # Install Pipenv, the -n option makes sudo fail instead of asking for a | ||
| # password if we don’t have sufficient privileges to run it | ||
| sudo -n dnf install -y pipenv | ||
| #sudo -n dnf install -y pipenv | ||
|
|
||
| cd /vagrant | ||
| # Install dependencies with Pipenv | ||
| pipenv sync | ||
| #pipenv sync | ||
|
|
||
| # Run database migrations | ||
| pipenv run python manage.py migrate | ||
| python3 manage.py migrate | ||
|
|
||
| # run our app. Nohup and “&” are used to let the setup script finish | ||
| # while our app stays up. The app logs will be collected in nohup.out | ||
|
|
||
| (setsid pipenv run python manage.py runserver 0.0.0.0:8000 > runserver.log 2>&1 &) | ||
| #(setsid python3 manage.py runserver 0.0.0.0:8000 > runserver.log 2>&1 )& | ||
| python3 manage.py runserver 0.0.0.0:8000 > runserver.log 2>&1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't output the logs to a file - when running in a container you want to have the logs be tracked by the runtime. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ack |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Base: ubi9 | ||
|
|
||
| # Django | ||
| asgiref==3.5.0 | ||
| Django==4.0.3 | ||
| sqlparse==0.4.2 | ||
|
|
||
| # pytest | ||
| attrs==21.4.0 | ||
| iniconfig==1.1.1 | ||
| packaging==21.3 | ||
| pluggy==1.0.0 | ||
| py==1.11.0 | ||
| pyparsing==3.0.7 | ||
| pytest==7.1.0 | ||
| pytest-django==4.5.2 | ||
| tomli==2.0.1 | ||
|
|
||
| # linters | ||
| ## flake8 | ||
| flake8==4.0.1 | ||
| mccabe==0.6.1 | ||
| pycodestyle==2.8.0 | ||
| pyflakes==2.4.0 | ||
|
|
||
| # black (formatter) | ||
| black==22.1.0 | ||
| click==8.0.4 | ||
| mypy-extensions==0.4.3 | ||
| pathspec==0.9.0 | ||
| platformdirs==2.5.1 | ||
| typing-extensions==4.1.1 |
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.
please build a version that uses pipenv - requirements.txt is not an adequate replacement.
try using Red Hat's Python s2i image.
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.
I see this
https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md
It is very interesting but not clear for me,
I see an option for django pipenv and for release gunicorn option,
Could be that i need more guidance here
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.
Found this https://developers.redhat.com/articles/2022/11/22/pipenv-and-s2i-better-way-manage-python-dependencies-containers#shortcomings_of_pip