Skip to content

Commit

Permalink
feat(WIP): Add entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
freshavocado7 committed Apr 9, 2024
1 parent 263ade8 commit 0d0f951
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ COPY --from=build-frontend /app/dist/ ./frontend/dist/
# Expose the port the app runs in
EXPOSE 8000

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
# Start the application
CMD ["python", "-m", "capella_model_explorer.backend", "/model", "/views"]
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
sed -i 's#__ROUTE_PREFIX__#'"$ROUTE_PREFIX"'#g' frontend/public/env.js
exec "$@"
4 changes: 2 additions & 2 deletions frontend/public/env.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
window.env = {
ROUTE_PREFIX: '/session/xy',
API_BASE_URL: 'http://localhost:8000/session/xy/api',
ROUTE_PREFIX: '__ROUTE_PREFIX__',
API_BASE_URL: 'http://localhost:8000__ROUTE_PREFIX__/api',
}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ classifiers = [
dependencies = [
"capellambse",
"capellambse-context-diagrams",
"python-dotenv",
"jinja2",
"pandas",
"streamlit",
Expand Down

0 comments on commit 0d0f951

Please sign in to comment.