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

Container version #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Container version #11

wants to merge 1 commit into from

Conversation

Yarboa
Copy link
Owner

@Yarboa Yarboa commented Dec 28, 2022

*) Build with docker file
podman build -f Containerfile -t fedora36-django
*) Push to quay

To Run pull from Quay in background (detached)
podman run --rm --name django-server -d -v ${PWD}:/vagrant:Z -p 8000:8000 -it quay.io/yarboa/django-fedora36

To connect
podman exec -it $(podman ps --filter "name=django-server" --format="{{ .ID }}") /bin/bash

Removed pipeenv from gihub workflow

@Yarboa Yarboa force-pushed the podman-migration branch 2 times, most recently from 3d42a01 to 78b9da3 Compare December 28, 2022 09:05
*) Build with docker file
podman build -f Containerfile -t fedora36-django
*) Push to quay

To Run pull from Quay
podman run -v ${PWD}:/vagrant:Z -p 8000:8000 -it <imageid> /bin/bash
<imageid> = quay.io/yarboa/django-fedora36

Removed pipeenv from gihub workflow
@Yarboa
Copy link
Owner Author

Yarboa commented Dec 28, 2022

@Yarboa please add README,

  1. How to install podman
  2. How to create and push the image into registry
  3. How to run it locally

dnf clean all

RUN \
python3 -m pip install -r requirements.txt

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.

Copy link
Owner Author

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

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# 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
Copy link

@ifireball ifireball Dec 28, 2022

Choose a reason for hiding this comment

The 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.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants