Skip to content
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

#1806 Add DevContainer configuration #1807

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarianPalkus
Copy link

Description

Add DevContainers based on quickstart-project to improve the handling of the development environment. Ports 80 (quickstart project) and 8025 (mailhog) are forwarded within the DevContainer setup.

Addressing #1806.

Implementation

  • add devcontainer.json based on docker compose
  • add a docker-compose file for devcontainer setup
  • there were issues to make mailslurper accessible through codespace port forwarding therefore it has been replaced by mailhog

Tests

The setup can be tried here:

  • https://github.com/MarianPalkus/hanko
  • "Code" -> "Codespaces ..." -> "New with options..."
  • Screenshot 2024-10-19 at 00 55 50
  • Select branch "devcontainers" and "create codespace"
  • Screenshot 2024-10-19 at 00 57 38
  • the codespace should be opened
  • After initialization has finished (might take some minutes) the quickstart-page can be accessed via "Ports" -> Port 80 -> "Open in Browser"
  • Screenshot 2024-10-19 at 00 44 26
  • mailhog can be accessed via "Ports" -> Port 8025 -> "Open in Browser"

The quickstart-example should be fully working:

Screenshot 2024-10-19 at 00 44 50 Screenshot 2024-10-19 at 00 44 42

Todos

  • the service entry in the devcontainer docker-compose file might not be required
  • code changes should directly be visible in the quickstart-page: configure hmr/fast refresh for elements and frontend-sdk and watch-build for backend
  • devcontainer-docker-compose-file and custom config files might be moved to the .devcontainers directory
  • webauthn origin config might be wrong

Additional context

This commit introduces DevContainers based on quickstart, improving the handling of the development environment.
Ports 80 (quickstart project) and 8025 (mailhog) are forwarded within the DevContainer setup. This enhances connectivity and ease of access for local development and debugging with frontend services running inside the container.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

1 participant