Commit 3807efc6 authored by Jakob Moser's avatar Jakob Moser
Browse files

Merge branch 'introduce-pipenv-and-utils' into 'master'

Introduce Pipenv

See merge request !21
parents 9b2f61db ce0cf990
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -6,9 +6,11 @@ EXPOSE 5000

# First, copy and install only the requirements...
RUN pip install --upgrade pip setuptools
COPY requirements.txt .
RUN pip install pipenv
COPY Pipfile.lock .
RUN pipenv requirements > requirements.txt
RUN pip uninstall --yes pipenv
RUN pip install -r requirements.txt

# ... then the rest of the application. This allows the installation stage to be cached most of the time
# (so we don't have reinstall of all dependencies every time the container is rebuilt)
COPY . .

Pipfile

0 → 100644
+23 −0
Original line number Diff line number Diff line
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
alembic = "*"
argon2-cffi = "*"
flask-sqlalchemy = "*"
flask = "*"
ldap3 = "*"
requests = "*"
sqlalchemy = "*"

[dev-packages]
black = "*"
mypy = "*"
types-requests = "*"
types-ldap3 = "*"

[requires]
python_version = "3.12"
python_full_version = "3.12.4"

Pipfile.lock

0 → 100644
+687 −0

File added.

Preview size limit exceeded, changes collapsed.

+5 −6
Original line number Diff line number Diff line
@@ -51,9 +51,9 @@ sudo docker exec -it portal-app-1 flask shell

```bash
# mkdir yourself into the portal directory
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Have pipenv (pip install pipenv) installed
pipenv install
pipenv shell
export FLASK_APP=portal
alembic upgrade head # to create (and update!) the database
flask run
@@ -63,9 +63,8 @@ Also, you have to set up the LDAP server in Flask. At the moment we are required

```sh
sudo ssh -D <your_forwarded_port> -p 80 <username>@lennon.cl.uni-heidelberg.de -L 636:ldap2:636
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pipenv install
pipenv shell
export FLASK_APP=portal
alembic upgrade head # to create (and update!) the database
flask run

pyproject.toml

0 → 100644
+7 −0
Original line number Diff line number Diff line
[tool.mypy]
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
Loading