Skip to content

chore(config): add devcontainer setup - #154

Draft
etiennej70 wants to merge 3 commits into
mainfrom
feat/devcontainer
Draft

etiennej70 wants to merge 3 commits into
mainfrom
feat/devcontainer

Conversation

@etiennej70

Copy link
Copy Markdown
Collaborator

What this PR Provides

  • A ready-to-use VS Code development environment (devcontainer) so contributors can start coding without installing Java, Maven, PostgreSQL, or other tools manually
  • Automatic startup of the database, the documentation site, and the API when the container opens, with simple commands to check status, view logs, stop, or restart each of them
  • Support for Windows, macOS, and Linux, including cloud dev environments
  • CI check that verifies the devcontainer still builds and works correctly on every change to it
  • Weekly automated dependency updates for the devcontainer tooling itself

Fixes

N/A

Review

The reviewer must double-check these points:

  • The reviewer has tested the feature
  • The reviewer has reviewed the implementation of the feature
  • The documentation has been updated

How to test

Initial state: You have Docker Desktop (Windows/macOS) or Docker Engine (Linux) installed, and VS Code with the "Dev Containers" extension.

Steps:

  1. Clone the repository and open the folder in VS Code
  2. When prompted, click "Reopen in Container" (or open the Command Palette and run "Dev Containers: Reopen in Container")
  3. Wait for the first build to finish (this downloads tools and may take several minutes)
  4. Once VS Code is ready, open a browser and go to http://localhost:8084 — you should see the API responding
  5. Open http://localhost:8000 — you should see the documentation site
  6. In the VS Code terminal, run: bash .devcontainer/scripts/dev-services.sh status all — you should see the app and docs services reported as running
  7. Make a small change to a Java file, save it, and confirm the API automatically restarts (check terminal logs)

Expected result: The container opens without errors, the API and docs are reachable at the URLs above, and code changes trigger an automatic reload.

Breaking changes

N/A

Comment thread .github/workflows/devcontainer.yml Fixed
@github-code-quality

github-code-quality Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: Java

Java / code-coverage/jacoco

The overall line coverage in commit 89035f8 in the feat/devcontainer branch remains at 91%, unchanged from commit 2038027 in the main branch.


Updated September 24, 2026 15:22 UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Shared Docker state, stale PID ownership, and incomplete CA import can cause corruption, unrelated process termination, or failed proxy connectivity.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 High severity · 1 Medium severity · 3 Low severity

Open (6)
What changed in this PR

Adds a reproducible VS Code development container with automated services, CI validation, dependency updates, and contributor documentation.

Changes:

  • Adds the Java 25 devcontainer and lifecycle scripts.
  • Automates PostgreSQL, API, and documentation startup.
  • Adds CI verification and weekly dependency updates.
File Description
.devcontainer/​Dockerfile Builds the development image and imports certificates.
.devcontainer/​certs/​.gitkeep Preserves the certificate directory.
.devcontainer/​devcontainer-lock.json Locks devcontainer features.
.devcontainer/​devcontainer.json Configures tools, volumes, ports, and lifecycle commands.
.devcontainer/​post-create.sh Installs dependencies and prepares Maven.
.devcontainer/​post-start.sh Starts PostgreSQL, docs, and API services.
.devcontainer/​scripts/​dev-services.sh Manages application and documentation processes.
.devcontainer/​scripts/​export-host-ca-certs.sh Exports host CA certificates.
.gitattributes Enforces platform-appropriate line endings.
.github/​dependabot.yml Adds weekly container dependency updates.
.github/​workflows/​devcontainer.yml Builds and verifies the devcontainer in CI.
.gitignore Excludes exported host certificates.
docker-compose.yml Pins PostgreSQL and adds a health check.
docs/​src/​contributing/​development-setup.md Documents devcontainer usage and troubleshooting.
src/​main/​resources/​application-local.yml Disables Spring browser LiveReload locally.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

},
"mounts": [
"source=idp-core-m2,target=/home/vscode/.m2,type=volume",
"source=idp-core-dind,target=/var/lib/docker,type=volume"
Comment on lines +40 to +41
pid="$(cat "$IDP_STATE_DIR/$1.pid" 2>/dev/null)" || return 1
[ -n "$pid" ] && kill -0 "-$pid" 2>/dev/null && echo "$pid"
Comment thread .devcontainer/Dockerfile

COPY certs/ /usr/local/share/ca-certificates/idp/

RUN update-ca-certificates
Comment thread docs/src/contributing/development-setup.md Outdated
Comment thread docs/src/contributing/development-setup.md Outdated
Comment thread docs/src/contributing/development-setup.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Etienne JACQUOT <2057151+etiennej70@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

3 participants