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

Run action with additional args #14

Open
hannes-sistemica opened this issue Jul 30, 2024 · 1 comment
Open

Run action with additional args #14

hannes-sistemica opened this issue Jul 30, 2024 · 1 comment

Comments

@hannes-sistemica
Copy link

Hi,

locally I can run "slim build --expose 8080 --expose 8000 --include-path /home/appuser --include-path /srv geniepy/demo" which gives me a runnable container. However when I execute
- name: Slim down the container image
uses: kitabisa/[email protected]
env:
DSLIM_HTTP_PROBE: false
SLIM_EXPOSE: "8080,8000"
SLIM_INCLUDE_PATH: "/home/appuser"
with:
target: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
tag: ${{ github.sha }}-slim
args: "--expose ${SLIM_EXPOSE} --include-path ${SLIM_INCLUDE_PATH}"

I does not consider the args, so that the resulting image (24MB!) does not work as expected, as there is too many things removed. I have caddy running, some static html and a FlaskAPI backend (reflex). Actually you I try to package a Python Reflex app (https://geniepy.com)

@alepaltri
Copy link

alepaltri commented Nov 12, 2024

Actually, you can can control the behavior of the Slim build command by setting environment variables (More info).

Therefore you can set the include path and the expose via setting the following envs:

  • DSLIM_INCLUDE_PATH
  • DSLIM_NEW_EXPOSE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants