feat: Add Docker and Codespaces development environments#30
Merged
Conversation
This commit introduces two development environment setups for the OTE v2 project: a local Docker-based environment and a cloud-based GitHub Codespaces environment. The Docker setup includes: - A `compose.dev.yml` file to orchestrate the services (web, php-fpm, workspace, postgres, redis). - Dockerfiles for the `php-fpm` and `workspace` containers. - An Nginx configuration file. - A `.dockerignore` file. The GitHub Codespaces setup includes: - A `.devcontainer` directory with a `devcontainer.json` configuration file. - A `Dockerfile` and `docker-compose.yml` to define the Codespace environment. - The configuration automates the setup process, including dependency installation and database migration. The `README.md` file has been updated with detailed instructions on how to use both development environments. The root `Dockerfile` has been removed in favor of the more structured setup.
This commit introduces several improvements to the developer experience for the OTE project. - **Automated Code Formatting:** - Adds a `composer format` script that runs Laravel Pint to ensure consistent code style across the project. - The existing codebase has been formatted. - **Database Seeding:** - Adds database seeders for all major models (Languages, Users, Tokens, Lexical Entries). - This allows developers to quickly populate their database with sample data by running `php artisan db:seed`. - The Codespaces environment is now configured to run the seeders automatically upon creation. - **Shell Aliases:** - Adds convenient shell aliases (e.g., `pa` for `php artisan`) to the dev container's `.bashrc` file to speed up common tasks. - **Test Suite Improvements:** - Fixes a fragile test (`ExportOteFileCommandTest`) by making the command's output dynamic, removing the need for a hardcoded string. - All tests have been verified to pass.
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
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.
This change adds a comprehensive development environment setup for the OTE v2 project, supporting both local development with Docker and cloud-based development with GitHub Codespaces. It includes all necessary Dockerfiles, compose files, and configurations, as well as detailed instructions in the README.