Skip to content

Commit

Permalink
fix: broken python packages
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmostafa committed Aug 5, 2024
1 parent 1a81da7 commit 3d50bc2
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ __pycache__
spine/projects/*
spine/Spine-Database-API
spine/Spine-Toolbox
venv
.env
.venv
.vscode
local.json
client_secrets.json
Expand Down
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM python:3.12

WORKDIR /app

COPY . /app

RUN apt update && apt install -y \
build-essential \
gcc \
libpq-dev \
python3-dev

RUN pip install --upgrade pip setuptools wheel
RUN pip install GDX2py
RUN pip install spinedb_api --verbose

ENTRYPOINT [ "python", "src/app.py" ]
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: run
include .env
export

# target: help - Display callable targets.
help:
@egrep "^# target:" [Mm]akefile

# target: run - Run local web server.
run:
python src/app.py
8 changes: 8 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
rescalc:
image: rescalc
build:
context: .
dockerfile: ./install/Dockerfile
ports:
- 5000:5000
15 changes: 11 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@

services:
rescalc:
image: rescalc
build:
context: .
dockerfile: ./install/Dockerfile
ports:
- 5000:5000
- 5000:5000
db:
image: postgres:16
env_file: .env
ports:
- 5432:5432
volumes:
- pgdata:/var/lib/postgresql/data

volumes:
pgdata:
25 changes: 13 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
wheel
Flask==1.1.4
sqlalchemy
flask_oidc
okta
jill
pytest
PySide2
-e git+https://github.com/spine-tools/spine-engine.git@7be63302466f2826ab80ffa0730e31a052770fc4#egg=spine_engine
-e git+https://github.com/spine-tools/spine-items.git@f08c405fdcc4effc36da93d96239caf211718e92#egg=spine_items
-e git+https://github.com/spine-tools/Spine-Database-API.git@c147f787f314413356ce3a59cf608d6bbcd4bfa4#egg=spinedb_api
-e git+https://github.com/Spine-project/Spine-Toolbox.git@ee6c75e046f38f09e43314da9dfcf5bca8303d4a#egg=spinetoolbox
# flask==2.3.3
# flask_oidc
# jill
# okta
# pytest
# pyside6
# spine_engine
# sqlalchemy
spinedb_api
# -e git+https://github.com/spine-tools/spine-engine.git@7be63302466f2826ab80ffa0730e31a052770fc4#egg=spine_engine
# -e git+https://github.com/spine-tools/spine-items.git@f08c405fdcc4effc36da93d96239caf211718e92#egg=spine_items
# -e git+https://github.com/spine-tools/Spine-Database-API.git@c147f787f314413356ce3a59cf608d6bbcd4bfa4#egg=spinedb_api
# -e git+https://github.com/Spine-project/Spine-Toolbox.git@ee6c75e046f38f09e43314da9dfcf5bca8303d4a#egg=spinetoolbox

0 comments on commit 3d50bc2

Please sign in to comment.