Skip to content

Commit

Permalink
add devcontainers for client and server
Browse files Browse the repository at this point in the history
added language links in readme
Stop tracking .vscode/settings.json
Stop tracking .devcontainer/update_settings.sh
  • Loading branch information
Louis Low committed Sep 19, 2024
1 parent 67e0656 commit f671e35
Show file tree
Hide file tree
Showing 21 changed files with 1,036 additions and 22 deletions.
67 changes: 67 additions & 0 deletions .devcontainer/angular_dotnet/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"name": "Angular + Dotnet",
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"forwardPorts": [
5000,
5001,
4200
],
"portsAttributes": {
"5000": {
"label": "Dotnet HTTP",
"onAutoForward": "openBrowserOnce"
},
"5001": {
"label": "Dotnet HTTPS",
"onAutoForward": "openBrowserOnce"
},
"4200": {
"label": "Angular",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"BRAINTREE_MERCHANT_ID": {
"description": "Sandbox merchant ID of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PUBLIC_KEY": {
"description": "Sandbox public key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PRIVATE_KEY": {
"description": "Sandbox private key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
}
},
"containerEnv": {
"DOMAINS": "paypal.com",
"VISIBLE_FOLDER_SERVER": "dotnet",
"VISIBLE_FOLDER_CLIENT": "angular"
},
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.codetour",
"PayPal.vscode-paypal",
"ms-dotnettools.csharp"
]
},
"settings": {
"git.openRepositoryInParentFolders": "always"
},
"codespaces": {
"openFiles": [
"README.md"
]
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
},
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && cd server/dotnet && dotnet restore && cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm install",
"postAttachCommand": "cd server/dotnet && dotnet run & cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm start --no-analytics"
}
67 changes: 67 additions & 0 deletions .devcontainer/angular_java/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"name": "Angular + Java",
"image": "mcr.microsoft.com/devcontainers/java:17",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"forwardPorts": [
8080,
4200
],
"portsAttributes": {
"8080": {
"label": "Java",
"onAutoForward": "openBrowserOnce"
},
"4200": {
"label": "Angular",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"BRAINTREE_MERCHANT_ID": {
"description": "Sandbox merchant ID of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PUBLIC_KEY": {
"description": "Sandbox public key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PRIVATE_KEY": {
"description": "Sandbox private key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
}
},
"containerEnv": {
"DOMAINS": "paypal.com",
"VISIBLE_FOLDER_SERVER": "java",
"VISIBLE_FOLDER_CLIENT": "angular"
},
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.codetour",
"PayPal.vscode-paypal",
"vscjava.vscode-java-pack",
"angular.ng-template"
]
},
"settings": {
"git.openRepositoryInParentFolders": "always"
},
"codespaces": {
"openFiles": [
"README.md"
]
}
},
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "17",
"installMaven": "true"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
},
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && cd /workspaces/${localWorkspaceFolderBasename}/server && touch java/.env && cd java && mvn clean install && cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm install",
"postAttachCommand": "cd /workspaces/${localWorkspaceFolderBasename}/server/java && mvn spring-boot:run & cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm start --no-analytics"
}
62 changes: 62 additions & 0 deletions .devcontainer/angular_node/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "Angular + Node",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"forwardPorts": [
3000,
4200
],
"portsAttributes": {
"3000": {
"label": "Node",
"onAutoForward": "openBrowserOnce"
},
"4200": {
"label": "Angular",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"BRAINTREE_MERCHANT_ID": {
"description": "Sandbox merchant ID of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PUBLIC_KEY": {
"description": "Sandbox public key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PRIVATE_KEY": {
"description": "Sandbox private key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
}
},
"containerEnv": {
"DOMAINS": "paypal.com",
"VISIBLE_FOLDER_SERVER": "node",
"VISIBLE_FOLDER_CLIENT": "angular"
},
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.codetour",
"PayPal.vscode-paypal",
"dbaeumer.vscode-eslint"
]
},
"settings": {
"git.openRepositoryInParentFolders": "always"
},
"codespaces": {
"openFiles": [
"README.md"
]
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
},
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && cd server/node && npm install && cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm install",
"postAttachCommand": "cd server/node && npm start & cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm start --no-analytics"
}
62 changes: 62 additions & 0 deletions .devcontainer/angular_php/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "Angular + PHP",
"image": "mcr.microsoft.com/devcontainers/php:8",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"forwardPorts": [
8080,
4200
],
"portsAttributes": {
"8080": {
"label": "PHP",
"onAutoForward": "openBrowserOnce"
},
"4200": {
"label": "Angular",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"BRAINTREE_MERCHANT_ID": {
"description": "Sandbox merchant ID of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PUBLIC_KEY": {
"description": "Sandbox public key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PRIVATE_KEY": {
"description": "Sandbox private key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
}
},
"containerEnv": {
"DOMAINS": "paypal.com",
"VISIBLE_FOLDER_SERVER": "php",
"VISIBLE_FOLDER_CLIENT": "angular"
},
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.codetour",
"PayPal.vscode-paypal",
"xdebug.php-debug"
]
},
"settings": {
"git.openRepositoryInParentFolders": "always"
},
"codespaces": {
"openFiles": [
"README.md"
]
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
},
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && cd /workspaces/${localWorkspaceFolderBasename}/server && touch php/.env && cd php && composer install && cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm install",
"postAttachCommand": "cd server/php && php -S localhost:8080 -t public/ & cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm start --no-analytics"
}
63 changes: 63 additions & 0 deletions .devcontainer/angular_python/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "Angular + Python",
"image": "mcr.microsoft.com/devcontainers/python:3.10",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"forwardPorts": [
8888,
4200
],
"portsAttributes": {
"8888": {
"label": "Python",
"onAutoForward": "openBrowserOnce"
},
"4200": {
"label": "Angular",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"BRAINTREE_MERCHANT_ID": {
"description": "Sandbox merchant ID of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PUBLIC_KEY": {
"description": "Sandbox public key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PRIVATE_KEY": {
"description": "Sandbox private key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
}
},
"containerEnv": {
"DOMAINS": "paypal.com",
"VISIBLE_FOLDER_SERVER": "python",
"VISIBLE_FOLDER_CLIENT": "angular"
},
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.codetour",
"PayPal.vscode-paypal",
"ms-python.python"
]
},
"settings": {
"git.openRepositoryInParentFolders": "always",
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
},
"codespaces": {
"openFiles": [
"README.md"
]
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
},
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && cd server/python && python -m venv .venv && . .venv/bin/activate && pip install --upgrade pip && pip install -r requirements.txt && cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm install",
"postAttachCommand": "cd server/python && . .venv/bin/activate && python app.py & cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm start --no-analytics"
}
62 changes: 62 additions & 0 deletions .devcontainer/angular_ruby/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "Angular + Ruby",
"image": "mcr.microsoft.com/devcontainers/ruby:2.7",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"forwardPorts": [
4567,
4200
],
"portsAttributes": {
"4567": {
"label": "Ruby",
"onAutoForward": "openBrowserOnce"
},
"4200": {
"label": "Angular",
"onAutoForward": "openBrowserOnce"
}
},
"secrets": {
"BRAINTREE_MERCHANT_ID": {
"description": "Sandbox merchant ID of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PUBLIC_KEY": {
"description": "Sandbox public key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
},
"BRAINTREE_PRIVATE_KEY": {
"description": "Sandbox private key of the application.",
"documentationUrl": "https://sandbox.braintreegateway.com/home"
}
},
"containerEnv": {
"DOMAINS": "paypal.com",
"VISIBLE_FOLDER_SERVER": "ruby",
"VISIBLE_FOLDER_CLIENT": "angular"
},
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.codetour",
"PayPal.vscode-paypal",
"rebornix.Ruby"
]
},
"settings": {
"git.openRepositoryInParentFolders": "always"
},
"codespaces": {
"openFiles": [
"README.md"
]
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
},
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && cd server/ruby && gem install bundler:1.17.2 && bundle _1.17.2_ install --path vendor/bundle && cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm install",
"postAttachCommand": "cd server/ruby && bundle exec ruby src/server.rb & cd /workspaces/${localWorkspaceFolderBasename}/client/angular && npm start --no-analytics"
}
Loading

0 comments on commit f671e35

Please sign in to comment.