Skip to content

feat: Add Docker and Codespaces development environments#30

Merged
attogram merged 2 commits into
masterfrom
feature/dev-container-setup
Aug 26, 2025
Merged

feat: Add Docker and Codespaces development environments#30
attogram merged 2 commits into
masterfrom
feature/dev-container-setup

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

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.

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.
@attogram attogram marked this pull request as ready for review August 26, 2025 22:33
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.
@attogram attogram merged commit 628f84a into master Aug 26, 2025
1 check passed
@attogram attogram deleted the feature/dev-container-setup branch August 26, 2025 23:19
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.

1 participant