Skip to content

Create Devcontainer config #1189

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/php
{
"name": "PHP",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/php:1-8.4-bullseye",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {}
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"extensions": [
"DEVSENSE.composer-php-vscode",
"editorconfig.editorconfig",
"ms-vscode.makefile-tools"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8080
],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sudo .devcontainer/post-create.sh && sudo chmod a+x \"$(pwd)\" && sudo ln -s \"$(pwd)\" /var/www/html",
"waitFor": "postCreateCommand",
"postAttachCommand": {
"Server": "apache2ctl start"
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
7 changes: 7 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

test -f composer.json && composer install

sed -i 's/Listen 80$//' /etc/apache2/ports.conf \
&& sed -i 's/<VirtualHost \*:80>/ServerName 127.0.0.1\n<VirtualHost \*:8080>/' /etc/apache2/sites-enabled/000-default.conf \
&& rm -rf /var/www/html
19 changes: 15 additions & 4 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
version: 2

updates:
- allow:
- package-ecosystem: "composer"
allow:
- dependency-type: "development"
commit-message:
include: "scope"
Expand All @@ -12,18 +13,28 @@ updates:
labels:
- "dependency"
open-pull-requests-limit: 10
package-ecosystem: "composer"
schedule:
interval: "weekly"
versioning-strategy: "increase"

- commit-message:
- package-ecosystem: "github-actions"
commit-message:
include: "scope"
prefix: "github-actions"
directory: "/"
labels:
- "dependency"
open-pull-requests-limit: 10
package-ecosystem: "github-actions"
schedule:
interval: "weekly"

- package-ecosystem: "devcontainers"
commit-message:
include: "scope"
prefix: "devcontainers"
directory: "/"
labels:
- "dependency"
open-pull-requests-limit: 10
schedule:
interval: "weekly"