-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding devcontianer files for Ruby and Python for module Advanced and…
… Standard Integration
- Loading branch information
Umar Nafeez Abdul Phatip
committed
Oct 18, 2024
1 parent
31e8d0e
commit 3363160
Showing
19 changed files
with
613 additions
and
1 deletion.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
.devcontainer/advanced-integration-v2-html-python/devcontainer.json
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,52 @@ | ||
// For more details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "advanced-integration-v2/html/python", | ||
"image": "mcr.microsoft.com/devcontainers/python:3.12", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
// Use 'onCreateCommand' to run commands when creating the container. | ||
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-python/welcome-message.sh", | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create", | ||
// Use 'postAttachCommand' to run commands when attaching to the container. | ||
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach", | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [3000, 8080], | ||
"portsAttributes": { | ||
"8080": { | ||
"label": "Preview of Advanced Checkout Flow" | ||
}, | ||
"3000": { | ||
"label": "HTML", | ||
"onAutoForward": "openBrowserOnce" | ||
} | ||
}, | ||
"secrets": { | ||
"PAYPAL_CLIENT_ID": { | ||
"description": "Sandbox client ID of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
}, | ||
"PAYPAL_CLIENT_SECRET": { | ||
"description": "Sandbox secret of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
} | ||
}, | ||
"containerEnv": { | ||
"VISIBLE_FOLDER_SERVER": "python", | ||
"VISIBLE_FOLDER_CLIENT": "html", | ||
"VISIBLE_FOLDER_PROJECT": "advanced-integration", | ||
"VISIBLE_FOLDER_VERSION": "v2" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["vsls-contrib.codetour", "PayPal.vscode-paypal"], | ||
"settings": { | ||
"git.openRepositoryInParentFolders": "always" | ||
} | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "lts" | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
.devcontainer/advanced-integration-v2-html-python/welcome-message.sh
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,23 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
WELCOME_MESSAGE=" | ||
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\" | ||
🛠️ Your environment is fully setup with all the required software. | ||
🚀 Once you rename the \".env.example\" file to \".env\" and update \"PAYPAL_CLIENT_ID\" and \"PAYPAL_CLIENT_SECRET\", the checkout page will automatically open in the browser after the server is restarted." | ||
|
||
ALTERNATE_WELCOME_MESSAGE=" | ||
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\" | ||
🛠️ Your environment is fully setup with all the required software. | ||
🚀 The checkout page will automatically open in the browser after the server is started." | ||
|
||
if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then | ||
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}" | ||
fi | ||
|
||
sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt" |
52 changes: 52 additions & 0 deletions
52
.devcontainer/advanced-integration-v2-html-ruby/devcontainer.json
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,52 @@ | ||
// For more details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "advanced-integration-v2/html/ruby", | ||
"image": "mcr.microsoft.com/devcontainers/ruby:3.3", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
// Use 'onCreateCommand' to run commands when creating the container. | ||
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-html-ruby/welcome-message.sh", | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create", | ||
// Use 'postAttachCommand' to run commands when attaching to the container. | ||
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach", | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [3000, 8080], | ||
"portsAttributes": { | ||
"8080": { | ||
"label": "Preview of Advanced Checkout Flow" | ||
}, | ||
"3000": { | ||
"label": "HTML", | ||
"onAutoForward": "openBrowserOnce" | ||
} | ||
}, | ||
"secrets": { | ||
"PAYPAL_CLIENT_ID": { | ||
"description": "Sandbox client ID of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
}, | ||
"PAYPAL_CLIENT_SECRET": { | ||
"description": "Sandbox secret of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
} | ||
}, | ||
"containerEnv": { | ||
"VISIBLE_FOLDER_SERVER": "ruby", | ||
"VISIBLE_FOLDER_CLIENT": "html", | ||
"VISIBLE_FOLDER_PROJECT": "advanced-integration", | ||
"VISIBLE_FOLDER_VERSION": "v2" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["vsls-contrib.codetour", "PayPal.vscode-paypal"], | ||
"settings": { | ||
"git.openRepositoryInParentFolders": "always" | ||
} | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "lts" | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
.devcontainer/advanced-integration-v2-html-ruby/welcome-message.sh
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,23 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
WELCOME_MESSAGE=" | ||
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\" | ||
🛠️ Your environment is fully setup with all the required software. | ||
🚀 Once you rename the \".env.example\" file to \".env\" and update \"PAYPAL_CLIENT_ID\" and \"PAYPAL_CLIENT_SECRET\", the checkout page will automatically open in the browser after the server is restarted." | ||
|
||
ALTERNATE_WELCOME_MESSAGE=" | ||
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\" | ||
🛠️ Your environment is fully setup with all the required software. | ||
🚀 The checkout page will automatically open in the browser after the server is started." | ||
|
||
if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then | ||
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}" | ||
fi | ||
|
||
sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt" |
52 changes: 52 additions & 0 deletions
52
.devcontainer/advanced-integration-v2-react-python/devcontainer.json
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,52 @@ | ||
// For more details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "advanced-integration-v2/react/python", | ||
"image": "mcr.microsoft.com/devcontainers/python:3.12", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
// Use 'onCreateCommand' to run commands when creating the container. | ||
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-react-python/welcome-message.sh", | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create", | ||
// Use 'postAttachCommand' to run commands when attaching to the container. | ||
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach", | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [3000, 8080], | ||
"portsAttributes": { | ||
"8080": { | ||
"label": "Preview of Advanced Checkout Flow" | ||
}, | ||
"3000": { | ||
"label": "React", | ||
"onAutoForward": "openBrowserOnce" | ||
} | ||
}, | ||
"secrets": { | ||
"PAYPAL_CLIENT_ID": { | ||
"description": "Sandbox client ID of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
}, | ||
"PAYPAL_CLIENT_SECRET": { | ||
"description": "Sandbox secret of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
} | ||
}, | ||
"containerEnv": { | ||
"VISIBLE_FOLDER_SERVER": "python", | ||
"VISIBLE_FOLDER_CLIENT": "react", | ||
"VISIBLE_FOLDER_PROJECT": "advanced-integration", | ||
"VISIBLE_FOLDER_VERSION": "v2" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["vsls-contrib.codetour", "PayPal.vscode-paypal"], | ||
"settings": { | ||
"git.openRepositoryInParentFolders": "always" | ||
} | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "lts" | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
.devcontainer/advanced-integration-v2-react-python/welcome-message.sh
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,23 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
WELCOME_MESSAGE=" | ||
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\" | ||
🛠️ Your environment is fully setup with all the required software. | ||
🚀 Once you rename the \".env.example\" file to \".env\" and update \"PAYPAL_CLIENT_ID\" and \"PAYPAL_CLIENT_SECRET\", the checkout page will automatically open in the browser after the server is restarted." | ||
|
||
ALTERNATE_WELCOME_MESSAGE=" | ||
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\" | ||
🛠️ Your environment is fully setup with all the required software. | ||
🚀 The checkout page will automatically open in the browser after the server is started." | ||
|
||
if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then | ||
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}" | ||
fi | ||
|
||
sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt" |
52 changes: 52 additions & 0 deletions
52
.devcontainer/advanced-integration-v2-react-ruby/devcontainer.json
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,52 @@ | ||
// For more details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "advanced-integration-v2/react/ruby", | ||
"image": "mcr.microsoft.com/devcontainers/ruby:3.3", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
// Use 'onCreateCommand' to run commands when creating the container. | ||
"onCreateCommand": "bash .devcontainer/advanced-integration-v2-react-ruby/welcome-message.sh", | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create", | ||
// Use 'postAttachCommand' to run commands when attaching to the container. | ||
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach", | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [3000, 8080], | ||
"portsAttributes": { | ||
"8080": { | ||
"label": "Preview of Advanced Checkout Flow" | ||
}, | ||
"3000": { | ||
"label": "React", | ||
"onAutoForward": "openBrowserOnce" | ||
} | ||
}, | ||
"secrets": { | ||
"PAYPAL_CLIENT_ID": { | ||
"description": "Sandbox client ID of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
}, | ||
"PAYPAL_CLIENT_SECRET": { | ||
"description": "Sandbox secret of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
} | ||
}, | ||
"containerEnv": { | ||
"VISIBLE_FOLDER_SERVER": "ruby", | ||
"VISIBLE_FOLDER_CLIENT": "react", | ||
"VISIBLE_FOLDER_PROJECT": "advanced-integration", | ||
"VISIBLE_FOLDER_VERSION": "v2" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["vsls-contrib.codetour", "PayPal.vscode-paypal"], | ||
"settings": { | ||
"git.openRepositoryInParentFolders": "always" | ||
} | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "lts" | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
.devcontainer/advanced-integration-v2-react-ruby/welcome-message.sh
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,23 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
WELCOME_MESSAGE=" | ||
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\" | ||
🛠️ Your environment is fully setup with all the required software. | ||
🚀 Once you rename the \".env.example\" file to \".env\" and update \"PAYPAL_CLIENT_ID\" and \"PAYPAL_CLIENT_SECRET\", the checkout page will automatically open in the browser after the server is restarted." | ||
|
||
ALTERNATE_WELCOME_MESSAGE=" | ||
👋 Welcome to the \"PayPal Advanced Checkout Integration Example\" | ||
🛠️ Your environment is fully setup with all the required software. | ||
🚀 The checkout page will automatically open in the browser after the server is started." | ||
|
||
if [ -n "$PAYPAL_CLIENT_ID" ] && [ -n "$PAYPAL_CLIENT_SECRET" ]; then | ||
WELCOME_MESSAGE="${ALTERNATE_WELCOME_MESSAGE}" | ||
fi | ||
|
||
sudo bash -c "echo \"${WELCOME_MESSAGE}\" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt" |
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
51 changes: 51 additions & 0 deletions
51
.devcontainer/standard-integration-html-python/devcontainer.json
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,51 @@ | ||
// For more details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "standard-integration/html/python", | ||
"image": "mcr.microsoft.com/devcontainers/python:3.12", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
// Use 'onCreateCommand' to run commands when creating the container. | ||
"onCreateCommand": "bash .devcontainer/standard-integration-html-python/welcome-message.sh", | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "chmod +x .devcontainer/update_settings.sh && .devcontainer/update_settings.sh && chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-create", | ||
// Use 'postAttachCommand' to run commands when attaching to the container. | ||
"postAttachCommand": "chmod +x .devcontainer/post-commands.sh && .devcontainer/post-commands.sh post-attach", | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [3000, 8080], | ||
"portsAttributes": { | ||
"8080": { | ||
"label": "Preview of Standard Checkout Flow" | ||
}, | ||
"3000": { | ||
"label": "HTML", | ||
"onAutoForward": "openBrowserOnce" | ||
} | ||
}, | ||
"secrets": { | ||
"PAYPAL_CLIENT_ID": { | ||
"description": "Sandbox client ID of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
}, | ||
"PAYPAL_CLIENT_SECRET": { | ||
"description": "Sandbox secret of the application.", | ||
"documentationUrl": "https://developer.paypal.com/dashboard/applications/sandbox" | ||
} | ||
}, | ||
"containerEnv": { | ||
"VISIBLE_FOLDER_SERVER": "python", | ||
"VISIBLE_FOLDER_CLIENT": "html", | ||
"VISIBLE_FOLDER_PROJECT": "standard-integration" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["vsls-contrib.codetour", "PayPal.vscode-paypal"], | ||
"settings": { | ||
"git.openRepositoryInParentFolders": "always" | ||
} | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "lts" | ||
} | ||
} | ||
} |
Oops, something went wrong.