[2.x] [API stack] Improve installation for Sail projects and ensure consistency in env files #466
+24
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improves the API stack installation considering Sail projects and ensures consistency between
.env
and.env.example
.Consistency between
.env
and.env.example
Changes that were previously applied only to
.env
are now also applied to.env.example
. This ensures that the.env.example
file contains all the necessary environment variables, making it easier for team developers to set up the project. (Especially important for Sail projects, see below.)Considering API stack
Remove
VITE_PORT
fromdocker-compose.yml
andVITE_APP_NAME
from environment files: Since Vite is not used in the API stack, these are not needed.Considering Sail projects
Add
APP_PORT
to environment files: This is needed because when runningsail up
, the API is only accessible at http://localhost:80 instead of the intended http://localhost:8000. WhenAPP_PORT
is not set in the.env
file, the sail binary defaults it to port 80, causing this issue. Modifying the ports indocker-compose.yml
doesn't resolve this issue (as attempted in #464), because thesail
binary exportsAPP_PORT
beforedocker-compose.yml
is applied. AddingAPP_PORT
to.env
resolves the issue.This PR combines the changes from #463 + #465, since they were interrelated.