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

[2.x] [API stack] Improve installation for Sail projects and ensure consistency in env files #466

Closed
wants to merge 4 commits into from

Conversation

miclaus
Copy link
Contributor

@miclaus miclaus commented Feb 5, 2025

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 from docker-compose.yml and VITE_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 running sail up, the API is only accessible at http://localhost:80 instead of the intended http://localhost:8000. When APP_PORT is not set in the .env file, the sail binary defaults it to port 80, causing this issue. Modifying the ports in docker-compose.yml doesn't resolve this issue (as attempted in #464), because the sail binary exports APP_PORT before docker-compose.yml is applied. Adding APP_PORT to .env resolves the issue.


This PR combines the changes from #463 + #465, since they were interrelated.

@miclaus miclaus changed the title [2.x] [API stack] Improve installation for Sail projects and ensure consistency in .env.example [2.x] [API stack] Improve installation for Sail projects and ensure consistency in env files Feb 6, 2025
@taylorotwell
Copy link
Member

We are rebuilding our starter kits now.

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.

2 participants