-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b01166
commit 266765b
Showing
16 changed files
with
77 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.185.0/containers/php/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] PHP version: 8, 8.0, 7, 7.4, 7.3 | ||
ARG VARIANT="7" | ||
FROM mcr.microsoft.com/vscode/devcontainers/php:0-${VARIANT} | ||
|
||
# [Option] Install Node.js | ||
ARG INSTALL_NODE="true" | ||
ARG NODE_VERSION="lts/*" | ||
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> | ||
|
||
# [Optional] Uncomment this line to install global node packages. | ||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.185.0/containers/php | ||
{ | ||
"name": "PHP", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
// Update VARIANT to pick a PHP version: 8, 8.0, 7, 7.4, 7.3 | ||
"VARIANT": "7", | ||
"INSTALL_NODE": "true", | ||
"NODE_VERSION": "lts/*" | ||
} | ||
}, | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"php.validate.executablePath": "/usr/local/bin/php" | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"editorconfig.editorconfig", | ||
"davidanson.vscode-markdownlint", | ||
"streetsidesoftware.code-spell-checker", | ||
], | ||
|
||
// 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": "yarn install --cwd=src", | ||
|
||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"editorconfig.editorconfig", | ||
"ms-vscode-remote.remote-containers", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
# How to work on this project | ||
|
||
## Local dev env | ||
To run this project locally, you need Docker. | ||
The recommended development workflow is: | ||
|
||
Then call: | ||
1. Use **Visual Studio Code** and **Docker Desktop** | ||
1. Install the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) (see recommended extension) | ||
1. Open the **Command Palette** and choose **Remote-Containers: Reopen in Container** | ||
|
||
``` | ||
docker-compose up | ||
``` | ||
This will give you a [development Docker container](https://code.visualstudio.com/docs/remote/containers) that contains all necessary tools (PHP, Node, Yarn) and that can be edited directly from within Visual Studio Code. | ||
|
||
The site will then be available at: | ||
You can then start a webserver at port 8080 by calling `start-server.sh` via the **integrated terminal** in VSCode. | ||
|
||
``` | ||
http://localhost:8080 | ||
``` | ||
To rebuild the container, open the Command Palette and choose **Remote-Containers: Rebuild Container**. |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Git LFS file not shown
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Git LFS file not shown
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh -e | ||
|
||
php -S 0.0.0.0:8080 -t src |
Binary file not shown.