-
Notifications
You must be signed in to change notification settings - Fork 29
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
http.py: fix redirect and sdk intallation #362
base: develop
Are you sure you want to change the base?
Conversation
COPY ./app /app | ||
ENV SETUPTOOLS_SCM_PRETEND_VERSION=1.0.0 | ||
|
||
COPY . /all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaik, it is considered bad style to copy more stuff into the container, than you absolutely need (as it introduces security risks, as well as simply makes it larger).
If we keep it this way, I argue we should only copy the sdk folder, however maybe there's a better solution? Let's discuss in our next meeting!
@@ -15,7 +15,7 @@ See [below](#options) on how to configure this. | |||
## Building | |||
The container image can be built via: | |||
``` | |||
$ docker buildx build -t basyx-python-sdk-http-server . | |||
$ docker build -t basyx-python-server -f Dockerfile .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the -f Dockerfile
option should be not needed, but we should mention above that the user needs to be in the server
directory of the repository.
WORKDIR /app | ||
RUN pip install ../all/sdk[dev] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the server it should (by definition) be enough to install the SDK without the [dev]
dependencies, as it's an application using the SDK not a developer. Otherwise we defined the dependencies wrong.
context: .. | ||
dockerfile: server/Dockerfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit duplicated:
- We are in
/server
- We move the context one directroy up
- We specify the
/server/Dockerfile
.
If I'm not mistaken, the build: .
option should still work
@@ -1,6 +1,8 @@ | |||
services: | |||
app: | |||
build: . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
Fixes the redirect from the AAS repository paths to the submodel repository paths.
Also installs the sdk locally instead of over git so changes immediately affect the server and not only after a Pull Request is merged.
Fixes #315