Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(schematic): fix how schematic_api folder being copied in Dockerfile #2579

Merged
merged 6 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/schematic/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ COPY ./self-signed.conf ./ssl-params.conf ./certificate.conf ./
COPY uwsgi.ini /app/uwsgi.ini

# copy files relevant for schematic apis
COPY schematic_api pyproject.toml poetry.lock /app/app/
COPY pyproject.toml poetry.lock /app/app/
COPY ./schematic_api /app/app/schematic_api

# install dependencies
WORKDIR /app/app
Expand Down
4 changes: 2 additions & 2 deletions apps/schematic/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ nx prepare schematic-api
# This step adds SSL private key and certificate as environment variable in .env file
python3 apps/schematic/api/prepare_key_certificate.py

# building the image
# Running the following command from root (/workspaces/sage-monorepo) to build the image
nx build-image schematic-api

# Start the containerized REST API with:
# In the same location as above, start the containerized REST API with:
nx serve-detach schematic-api
```
You could open your browser here:
Expand Down
3 changes: 1 addition & 2 deletions apps/schematic/api/schematic_api/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3

import connexion
from flask_cors import CORS
import flask
Expand All @@ -18,7 +17,7 @@


def main():
app.run(port=7080, debug=False)
app.run(port=7443, debug=False)


if __name__ == "__main__":
Expand Down
24 changes: 0 additions & 24 deletions apps/schematic/api/schematic_api/main.py

This file was deleted.

2 changes: 1 addition & 1 deletion apps/schematic/api/uwsgi.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[uwsgi]
# The variables http and *-socket are passed as command line arguments and
# must not be specified in this file.
wsgi-file = schematic_api/main.py
wsgi-file = schematic_api/__main__.py
callable = app
uid = www-data
gid = www-data
Expand Down
Loading