-
Notifications
You must be signed in to change notification settings - Fork 67
feat: Add DevContainer configuration for local development #484
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
Changes from all commits
1bbdcbe
69f69f4
2056b5a
70184c8
9c34608
aaa3d03
7594fa7
a68f326
1452f25
ec66d39
308fed0
ab0b52a
f164b2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| { | ||
| "name": "BeWelcome Rox (Docker Master)", | ||
| "dockerComposeFile": [ | ||
| "../docker-compose.yml", | ||
| "../docker-compose.override.yml.dist" | ||
| ], | ||
| "service": "php", | ||
| "workspaceFolder": "/srv/bewelcome", | ||
| "overrideCommand": false, | ||
| "forwardPorts": [80, 1080, 9306, 9308], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. macOS + Rancher Desktop note: Workaround tested on macOS + Rancher Desktop: remove Works fine on WSL/Docker Desktop as-is — this is a macOS-specific Rancher Desktop behaviour. Worth adding a note to the README. |
||
| "portsAttributes": { | ||
| "80": { | ||
| "label": "BeWelcome App (Nginx)", | ||
| "onAutoForward": "openBrowser" | ||
| }, | ||
| "1080": { | ||
| "label": "MailPit Web UI", | ||
| "onAutoForward": "notify" | ||
| }, | ||
| "9306": { | ||
| "label": "Manticore MySQL protocol", | ||
| "onAutoForward": "silent" | ||
| }, | ||
| "9308": { | ||
| "label": "Manticore HTTP API", | ||
| "onAutoForward": "silent" | ||
| } | ||
| }, | ||
| "hostRequirements": { | ||
| "cpus": 2, | ||
| "memory": "4gb", | ||
| "storage": "32gb" | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "bmewburn.vscode-intelephense-client", | ||
| "xdebug.php-debug", | ||
| "symfony-vscode.symfony-vscode", | ||
| "bradlc.vscode-tailwindcss", | ||
| "dbaeumer.vscode-eslint", | ||
| "esbenp.prettier-vscode", | ||
| "mikestead.dotenv", | ||
| "ms-azuretools.vscode-docker", | ||
| "GitHub.vscode-pull-request-github" | ||
| ], | ||
| "settings": { | ||
| "php.suggest.basic": false, | ||
| "editor.formatOnSave": true, | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "[php]": { | ||
| "editor.defaultFormatter": "bmewburn.vscode-intelephense-client" | ||
| }, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: |
||
| "intelephense.environment.phpVersion": "8.3.0", | ||
| "intelephense.files.maxSize": 5000000 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| * text=auto | ||
| *.sh text eol=lf | ||
| bin/console text eol=lf | ||
| .env text eol=lf |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,9 @@ services: | |
|
|
||
| # makes classes in src/ available to be used as services | ||
| # this creates a service per class whose id is the fully-qualified class name | ||
| App\Form\DataTransformer\: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| resource: '../src/Form/DataTransformer/*' | ||
|
|
||
| App\: | ||
| resource: '../src/*' | ||
| exclude: '../src/{DependencyInjection,Entity,Migrations,Model/MemberDataExtractor/DoctrineExtractor.php,Twig,Tests,Kernel.php}' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,12 +2,20 @@ | |
| # Not used by the beta or production stacks. | ||
| services: | ||
| php: | ||
| build: | ||
| target: bewelcome_php_dev | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Neither Please add: web:
ports:
- "80:80"
mailer:
ports:
- "1080:80" |
||
| volumes: | ||
| - .:/srv/bewelcome:rw,cached | ||
| - ./docker/php/conf.d/bewelcome.dev.ini:/usr/local/etc/php/conf.d/bewelcome.ini | ||
| # if you develop on Linux, you may use a bind-mounted host directory instead | ||
| # - ./var:/srv/bewelcome/var:rw | ||
|
|
||
| web: | ||
| ports: | ||
| - "80:80" | ||
| volumes: | ||
| - ./public:/srv/bewelcome/public:ro | ||
|
|
||
| mailer: | ||
| ports: | ||
| - "1080:80" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,7 +60,10 @@ services: | |
| - ./data:/var/lib/manticore | ||
|
|
||
| mailer: | ||
| image: tophfr/mailcatcher | ||
| image: axllent/mailpit | ||
| environment: | ||
| MP_SMTP_BIND_ADDR: "0.0.0.0:25" | ||
| MP_UI_BIND_ADDR: "0.0.0.0:80" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MailPit's web UI is bound to port 80 here, but Either change this to |
||
|
|
||
| volumes: | ||
| db-data: {} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ; Xdebug configuration for development | ||
| ; Disabled by default for performance. To enable, you can set XDEBUG_MODE=debug | ||
| xdebug.mode=off | ||
| xdebug.client_host=host.docker.internal | ||
| xdebug.start_with_request=yes | ||
| xdebug.discover_client_host=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The seed SQL files (
languages.sql,words.sql) are not in the repo — they are downloaded fromdownloads.bewelcome.organd decompressed bymake install. A fresh devcontainer skips this entirely, so the imports are silently skipped (if [ -f ... ]guard passes quietly) and the language/words tables end up empty, breaking locale switching and member language preferences.A
postCreateCommandis needed, for example: