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

Makefile #56

Merged
merged 6 commits into from
Apr 29, 2024
Merged

Makefile #56

merged 6 commits into from
Apr 29, 2024

Conversation

digitallysavvy
Copy link
Contributor

Updated Dockerfile

  • to support CORS_ALLOW_ORIGIN as a --build-arg
  • to use SERVER_PORT as the port exposed (previously was always set to 8080)

Added Makefile to simplify the build process.

  • Issue: The build process is a bit complex/confusing with setting .env for test the server with Go, to passing --build-arg for each environment variable.
  • Solution: Use make to streamline the process. The Makefile simplifies the build and run process by reducing them to a single command. The Makefile uses the .env file to add the list of --build-arg's to the docker build command and executes the docker run command after the build is completed. To avoid unnecessary rebuilds of the token server, the Makefile sets a build_marker target to watch the Dockerfile, .go source code, and .env file. This enables a single command to build and run the container that only rebuilds as needed.

@digitallysavvy digitallysavvy self-assigned this Apr 26, 2024
Copy link

render bot commented Apr 26, 2024

@digitallysavvy
Copy link
Contributor Author

This PR also addresses issue #40

@digitallysavvy digitallysavvy added bug Something isn't working enhancement New feature or request labels Apr 26, 2024
@digitallysavvy digitallysavvy merged commit 3bc7377 into main Apr 29, 2024
1 check passed
@digitallysavvy digitallysavvy deleted the makefile branch April 29, 2024 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant