-
Notifications
You must be signed in to change notification settings - Fork 10
Merge dev into master #2
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.devcontainer directory and LEMP container(s) added, but the setup for Laravel is not yet working. There are issues with setting up PHP and NGINX to serve only /public/ on the homepage of localhost
- docker .env PHP mount points modified. For laravel, serving from /public/ should be done at the NGINX level. PHP still needs access to everything that is in /src/ - Renamed the nginx php.conf file into nginx-webserver.conf - changed nginx-webserver.conf to match more closely the official Laravel settings. The previous config did not work with the Laravel Routes - in the php Dockerfile, added error files init for xdebug and php-errors - made small changes in xdebug.ini (php container) to get rid of unwanted "error" messages such as Client is not listening. NOT TESTED WITH ACTUAL STEp-DEBUG yet. Next: try devcontainer Next: try localhost step-debug
- forward open devcontainer port 80 by default - add local-dev xdebug vonfig \REPO\.vscode\launch.json
modified the Dockerfile to run composer, if the /vendor/ directory is not present. src\init_repo.sh is executed when the instance is launched. There's a check to see if /vendor/ already exists removed ( ) characters from xdebug.ini as they generated some errors in the comments # characters should not be used for comments
ENDPOINT crashes CoseSpaces, it's been reported by several users Change the readme to remind people that Laravel does require some initializations edit .sh file to not lunch PHP-FPM after composer install
don't try to run chmod in a mounted directory
add more automation to our post-install script
Documented the Codespace launch process and generally improved the documentation.
Dockerfile - install 'default-mysql-client' PHP extension so we can log into MySQL from the PHP container if we want to interact with the database container from there. - install and enable the pdo_mysql PHP extension with 'docker-php-ext-install pdo_mysql' and 'docker-php-ext-enable pdo_mysql'. This is required for Laravel docker-compose.yml - MYSQL_USER and MYSQL_PASSWORD don't seem to do much as the user 'myuser' does not seem to be created. For now, we'll use root + rootpassword /src/.env.example - set all the default MySQL connectivity and login information so it works out of the box - add a default MONGODB_URI for people to replace with their ATLAS connection string config\database.php - change DB_URI to the standard MONGODB_URI we use in our drivers and everything else \routes\api.php - added a \api\test_mysql\ route to check if the MySQL connection works. It's a VERY basic test and does not check for the table, but we can improve this later. The table is created by our Docker config
add the "ping" command to our PHP container. Convenient to debug stuff
- added DATABASE_URL in the php service environment Hopefully, it will help us with accessing MySQL in Codespaces - open 3306 mysql port in devcontainer.json
possible conflict in Laravel as there are TWO 'mysql' strings - Laravel MySQL database name - Docker 'mysql' service. Renaming the docker mysql service from 'mysql' to 'mysql_service'
- suspecting that we're not supposed to mount the MySQL folder in the CodeSpaces environment. It looks like our MySQL fails to start for some reason. That's why the 'mysql_service' name does not DNS-resolve unlike 'php' or 'nginx' Let's try - also, port 3306 does not need to be exposed in devcontainer.json, unless we try to access it from the outside.
- use the new MongoDB-owned package name (mongodb/laravel-mongodb): OK! - rename /api/ping/ to /api/test_mongodb/ to be consisten with /test_mysql/ `php artisan migrate:refresh` works, after both databases are accessible Misc: init_repo.sh now launched automatically if using devcontainer, since it's defined in devcontainer.json
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The repo has been modified to be launched via CodeSpaces, so people who want to take a quick look don't have to worry about setting anything up.
It is also possible to clone the repo locally and run
docker compose up
from the ./devcontainer/ directory.