How to build basic container for Laravel Development ?? #41168
Replies: 3 comments
-
I am having the same issue! I used a php:0-7.4 image with mariadb, installing node and composer in the build process (Dockerfile) so I could run a Laravel 5.8 app. In the postCreateCommand I create the .env file from a github secret and echo the preview url into it for use like so:
The .env is created with the content all there as expected and I can open the app with |
Beta Was this translation helpful? Give feedback.
-
OK, I was able to solve this with Also, one more fix if you end up using the .env hack above: I forgot to add the port to the url, so the command should be echo "APP_URL=https://${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}" |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I am usually code in next JS with node for front-end only.
Now I need to learn Laravel + MySQL I can't find any template for it.
Have try to manually install the stuff just like in VM but seems like it doesn't work
Then I try to just run Laravel Sail inside blank codespace and it works but I don't know why it always point to localhost / 0.0.0.0 / 127.0.0.1 even I've already changed it to my codespaces url like
xxx-random-80port.preview.app.github.dev
so I can not see the app preview or even I can open the preview the assets url still point the default localhost again.It might be in my laravel configuration, but I always hope for at least a basic XAMPP like template for codespaces.
I've try to use someone's template but it seems not updated.. I don't know what to modify it seems like combining lot of bash scripts with docker which is I don't understand.
Anyways I hope someoen can help me to build this container or tell me if someoen already have it ..
Beta Was this translation helpful? Give feedback.
All reactions