Skip to content

Add Docker based development environment#1441

Open
swdee wants to merge 4 commits into
Part-DB:masterfrom
swdee:docker-dev-env
Open

Add Docker based development environment#1441
swdee wants to merge 4 commits into
Part-DB:masterfrom
swdee:docker-dev-env

Conversation

@swdee

@swdee swdee commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds a Docker based development environment for PartDB, allowing contributors to get started with only Docker and Docker Compose installed.

The existing CONTRIBUTING.md documents the native PHP development workflow, which requires developers to manually install and configure PHP, Composer, Node.js, Yarn, and a database server. Having a containerized development environment makes setup for new developers much easier.

This PR introduces an alternative workflow that provides a fully configured development environment using Docker while leaving the existing native workflow unchanged and closes issue #969 and also addresses past inquiries like #713 .

Changes

  • Add Dockerfile.dev as a development image layered on top of the existing upstream production image.
  • Add compose.dev.yaml for running the Docker development environment.
  • Add .docker/dev/ development entrypoint and helper scripts.
  • Add DEVELOPMENT.md documenting the complete Docker development workflow.
  • Update CONTRIBUTING.md to reference DEVELOPMENT.md as an alternative development workflow.

Features

The Docker development environment provides:

  • Symfony running in development mode.
  • Composer development dependencies.
  • Node.js and Yarn included in the development image.
  • Automatic Webpack Encore asset rebuilding using yarn watch.
  • SQLite development database.
  • Automatic handling of bind-mounted source permissions.
  • No local installation of PHP, Composer, Node.js, Yarn, or a database server required.

Developer Workflow

A new contributor can now set up a complete development environment with only Docker installed by following the instructions in DEVELOPMENT.md.

The documented workflow includes:

  1. Building the upstream base image.
  2. Building the development image.
  3. Installing Composer dependencies.
  4. Building frontend assets.
  5. Creating the development database.
  6. Starting the development services.
  7. Automatic frontend rebuilding during development.

Notes

This PR intentionally does not replace the existing native development workflow.

Developers who prefer the existing PHP/Symfony workflow can continue using the instructions in CONTRIBUTING.md. The Docker workflow is provided as an additional option.

The development image is built on top of the existing production Docker image, so it remains aligned with the upstream runtime environment while adding the tools and configuration needed for development.

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.46%. Comparing base (a356b94) to head (08f907b).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1441      +/-   ##
============================================
- Coverage     58.48%   58.46%   -0.03%     
  Complexity     8707     8707              
============================================
  Files           639      639              
  Lines         28146    28146              
============================================
- Hits          16461    16455       -6     
- Misses        11685    11691       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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