Skip to content

Commit ee7e8dc

Browse files
committed
Container version
*) 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
1 parent 213f3d8 commit ee7e8dc

8 files changed

Lines changed: 70 additions & 253 deletions

File tree

.github/workflows/flake8.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
runs-on: ubuntu-20.04
77
container: fedora:36
88
steps:
9-
- name: Install Pipenv and Git
10-
run: dnf install -y pipenv git
9+
- name: Install Git
10+
run: dnf install -y git pip
1111
- name: Checkout code
1212
uses: actions/checkout@v2
1313
- name: Setup environment
14-
run: pipenv sync --dev
14+
run: pip install -r requirements.txt
1515
- name: Run Flake8
16-
run: pipenv run flake8 --max-line-length 120
16+
run: flake8 --max-line-length 120

.github/workflows/pytest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
runs-on: ubuntu-20.04
77
container: fedora:36
88
steps:
9-
- name: Install Pipenv and Git
10-
run: dnf install -y pipenv git
9+
- name: Install Git
10+
run: dnf install -y git pip
1111
- name: Checkout code
1212
uses: actions/checkout@v2
1313
- name: Setup environment
14-
run: pipenv sync --dev
14+
run: pip install -r requirements.txt
1515
- name: Run PyTest
16-
run: pipenv run pytest -v
16+
run: pytest -v

Containerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# fedora-36
2+
FROM registry.fedoraproject.org/fedora:36
3+
4+
WORKDIR /vagrant
5+
6+
COPY requirements.txt /vagrant
7+
8+
RUN \
9+
dnf -y install \
10+
# python3 \
11+
sqlite \
12+
pip \
13+
gcc \
14+
python3-devel \
15+
&& \
16+
dnf clean all
17+
18+
RUN \
19+
python3 -m pip install -r requirements.txt
20+
21+
COPY app_setup.sh /vagrant
22+
23+
ENTRYPOINT /bin/bash /vagrant/app_setup.sh
24+
25+
EXPOSE 8000/tcp

Pipfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

Pipfile.lock

Lines changed: 0 additions & 149 deletions
This file was deleted.

Vagrantfile

Lines changed: 0 additions & 77 deletions
This file was deleted.

app_setup.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55

66
# Install Pipenv, the -n option makes sudo fail instead of asking for a
77
# password if we don’t have sufficient privileges to run it
8-
sudo -n dnf install -y pipenv
8+
#sudo -n dnf install -y pipenv
99

1010
cd /vagrant
1111
# Install dependencies with Pipenv
12-
pipenv sync
12+
#pipenv sync
1313

1414
# Run database migrations
15-
pipenv run python manage.py migrate
15+
python3 manage.py migrate
1616

1717
# run our app. Nohup and “&” are used to let the setup script finish
1818
# while our app stays up. The app logs will be collected in nohup.out
1919

20-
(setsid pipenv run python manage.py runserver 0.0.0.0:8000 > runserver.log 2>&1 &)
20+
#(setsid python3 manage.py runserver 0.0.0.0:8000 > runserver.log 2>&1 )&
21+
python3 manage.py runserver 0.0.0.0:8000 > runserver.log 2>&1

requirements.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Base: ubi9
2+
3+
# Django
4+
asgiref==3.5.0
5+
Django==4.0.3
6+
sqlparse==0.4.2
7+
8+
# pytest
9+
attrs==21.4.0
10+
iniconfig==1.1.1
11+
packaging==21.3
12+
pluggy==1.0.0
13+
py==1.11.0
14+
pyparsing==3.0.7
15+
pytest==7.1.0
16+
pytest-django==4.5.2
17+
tomli==2.0.1
18+
19+
# linters
20+
## flake8
21+
flake8==4.0.1
22+
mccabe==0.6.1
23+
pycodestyle==2.8.0
24+
pyflakes==2.4.0
25+
26+
# black (formatter)
27+
black==22.1.0
28+
click==8.0.4
29+
mypy-extensions==0.4.3
30+
pathspec==0.9.0
31+
platformdirs==2.5.1
32+
typing-extensions==4.1.1

0 commit comments

Comments
 (0)