Skip to content

Commit

Permalink
Merge pull request #2 from PSNAppz/develop
Browse files Browse the repository at this point in the history
Merge develop changes
  • Loading branch information
PSNAppz authored Jun 4, 2024
2 parents d7876aa + 05c5673 commit 1affe86
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/openapi-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
python-version: "3.10"
- name: Install app
run: |
python -m pip install openg2p-fastapi-common==1.0.0
python -m pip install openg2p-g2pconnect-common-lib==1.0.0
python -m pip install openg2p-g2pconnect-mapper-lib==1.0.0
python -m pip install git+https://github.com/openg2p/openg2p-fastapi-common@develop\#subdirectory=openg2p-fastapi-common
python -m pip install git+https://github.com/openg2p/openg2p-g2pconnect-common-lib@develop\#subdirectory=openg2p-g2pconnect-common-lib
python -m pip install git+https://github.com/openg2p/openg2p-g2pconnect-common-lib@develop\#subdirectory=openg2p-g2pconnect-mapper-lib
python -m pip install .
- name: Generate openapi json
run: |
Expand Down
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ USER ${container_user}
ADD --chown=${container_user}:${container_user_group} . /app/src
ADD --chown=${container_user}:${container_user_group} main.py /app

RUN python3 -m venv venv \
&& . ./venv/bin/activate
RUN python3 -m pip install \
gunicorn \
git+https://github.com/psnappz/openg2p-fastapi-common@develop\#subdirectory=openg2p-fastapi-common \
openg2p-g2pconnect-common-lib==1.0.0 \
openg2p-g2pconnect-mapper-lib==1.0.0 \
git+https://github.com/openg2p/openg2p-fastapi-common@develop\#subdirectory=openg2p-fastapi-common \
git+https://github.com/OpenG2P/openg2p-g2pconnect-common-lib@develop\#subdirectory=openg2p-g2pconnect-common-lib \
git+https://github.com/OpenG2P/openg2p-g2pconnect-common-lib@develop\#subdirectory=openg2p-g2pconnect-mapper-lib \
./src

CMD ["/home/openg2p/.local/bin/gunicorn", "-w", "8", "-k", "uvicorn.workers.UvicornWorker", "main:mapper_app", "--bind", "0.0.0.0:8000"]
ENV SPAR_MAPPER_WORKER_TYPE=gunicorn
ENV SPAR_MAPPER_HOST=0.0.0.0
ENV SPAR_MAPPER_PORT=8000
ENV SPAR_MAPPER_NO_OF_WORKERS=3

CMD python3 main.py migrate; \
gunicorn "main:app" --workers ${SPAR_MAPPER_NO_OF_WORKERS} --worker-class uvicorn.workers.UvicornWorker --bind ${SPAR_MAPPER_HOST}:{SPAR_MAPPER_PORT}
2 changes: 1 addition & 1 deletion api-docs/generated/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "Mozilla Public License 2.0",
"url": "https://www.mozilla.org/en-US/MPL/2.0/"
},
"version": "1.0.0"
"version": "1.1.0"
},
"paths": {
"/sync/link": {
Expand Down
7 changes: 5 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@

initializer = Initializer()
PingInitializer()
# initializer.main()
mapper_app = app_registry.get()

app = main_init.return_app()

if __name__ == "__main__":
initializer.main()
2 changes: 1 addition & 1 deletion src/openg2p_spar_mapper_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.0"
__version__ = "1.1.0"
6 changes: 3 additions & 3 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pytest-asyncio
pytest-cov
openg2p-fastapi-common==1.0.0
openg2p-g2pconnect-common-lib==1.0.0
openg2p-g2pconnect-mapper-lib==1.0.0
git+https://github.com/openg2p/openg2p-fastapi-common@develop#subdirectory=openg2p-fastapi-common
git+https://github.com/openg2p/openg2p-g2pconnect-common@develop#subdirectory=openg2p-g2pconnect-common-lib
git+https://github.com/OpenG2P/openg2p-g2pconnect-common@develop#subdirectory=openg2p-g2pconnect-mapper-lib

0 comments on commit 1affe86

Please sign in to comment.