Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!21Introduce Pipenv
Pipeline #6629 passed
...@@ -6,9 +6,11 @@ EXPOSE 5000 ...@@ -6,9 +6,11 @@ EXPOSE 5000
# First, copy and install only the requirements... # First, copy and install only the requirements...
RUN pip install --upgrade pip setuptools 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 RUN pip install -r requirements.txt
# ... then the rest of the application. This allows the installation stage to be cached most of the time # ... 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) # (so we don't have reinstall of all dependencies every time the container is rebuilt)
COPY . . COPY . .
......
Pipfile 0 → 100644
[[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"
This diff is collapsed.
...@@ -51,9 +51,9 @@ sudo docker exec -it portal-app-1 flask shell ...@@ -51,9 +51,9 @@ sudo docker exec -it portal-app-1 flask shell
```bash ```bash
# mkdir yourself into the portal directory # mkdir yourself into the portal directory
python3 -m venv venv # Have pipenv (pip install pipenv) installed
source venv/bin/activate pipenv install
pip install -r requirements.txt pipenv shell
export FLASK_APP=portal export FLASK_APP=portal
alembic upgrade head # to create (and update!) the database alembic upgrade head # to create (and update!) the database
flask run flask run
...@@ -63,9 +63,8 @@ Also, you have to set up the LDAP server in Flask. At the moment we are required ...@@ -63,9 +63,8 @@ Also, you have to set up the LDAP server in Flask. At the moment we are required
```sh ```sh
sudo ssh -D <your_forwarded_port> -p 80 <username>@lennon.cl.uni-heidelberg.de -L 636:ldap2:636 sudo ssh -D <your_forwarded_port> -p 80 <username>@lennon.cl.uni-heidelberg.de -L 636:ldap2:636
python3 -m venv venv pipenv install
source venv/bin/activate pipenv shell
pip install -r requirements.txt
export FLASK_APP=portal export FLASK_APP=portal
alembic upgrade head # to create (and update!) the database alembic upgrade head # to create (and update!) the database
flask run flask run
......
[tool.mypy]
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
alembic~=1.12.1
argon2-cffi~=23.1.0
Flask-SQLAlchemy~=3.1.1
Flask~=3.0.0
ldap3~=2.9.1
requests~=2.32.3
SQLAlchemy~=2.0.23
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment