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

feat: simplify build step #23

Merged
merged 1 commit into from
Aug 13, 2024
Merged

feat: simplify build step #23

merged 1 commit into from
Aug 13, 2024

Conversation

webbertakken
Copy link
Member

@webbertakken webbertakken commented Aug 13, 2024

Original PR (cherry-picked): webbertakken/home-automation#2

Changes

  • Compile linux binary
  • Base docker off of Alpine (5 megs)
  • Install glibc in docker because alpine comes with musl libc
  • Simply add binary and run it

Note:

  • Build also runs, exactly the same way, in CI

Example commands for debugging:

  • Build dist + docker image: yarn build
  • Inspect docker image: dive automation-prod
  • Run prod image locally: docker run --env-file .env automation-prod
  • Run prod image interactively: docker run -it --rm --env-file .env automation-prod sh
2024-08-13-03-21-59.mp4

image

🗒️ Checklist

  • Read the contribution guide and accept the
    code of conduct
  • Readme and docs (updated or not needed)
  • Tests (added, updated or not needed)

@webbertakken webbertakken merged commit eafee63 into main Aug 13, 2024
1 check passed
@webbertakken webbertakken deleted the cherry-pick-docker branch August 13, 2024 21:38
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

Successfully merging this pull request may close these issues.

1 participant