-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from amansinghoriginal/main
Support launching Drasi Tutorial in Github Codespaces
- Loading branch information
Showing
3 changed files
with
64 additions
and
4 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,52 @@ | ||
{ | ||
"name": "Getting started with Drasi", | ||
"extends": "./base.devcontainer.json", | ||
"workspaceFolder": "/workspaces/learning/tutorial/getting-started", | ||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", | ||
"onCreateCommand": "bash ./.devcontainer/on-create.sh", | ||
"postCreateCommand": "bash ./.devcontainer/post-create.sh", | ||
"postStartCommand": "bash -c 'kubectl port-forward svc/postgres 5432:5432 &'", | ||
"runArgs": [ | ||
"--privileged", | ||
"--init" | ||
], | ||
// Features to add to the dev container. More info: https://containers.dev/features | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, | ||
"ghcr.io/rio/features/k3d:1": {} | ||
}, | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"ckolkman.vscode-postgres" | ||
] | ||
} | ||
}, | ||
"remoteEnv": { | ||
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}", | ||
"PGHOST": "localhost", | ||
"PGDATABASE": "hello-world", | ||
"PGPORT": "5432", | ||
"PGUSER" : "test", | ||
"PGPASSWORD" : "test" | ||
}, | ||
// Use 'portsAttributes' to set default properties for specific forwarded ports. | ||
// More info: https://containers.dev/implementors/json_reference/#port-attributes | ||
"portsAttributes": { | ||
"5432": { | ||
"label": "postgres", | ||
"onAutoForward": "silent" | ||
}, | ||
"8081": { | ||
"label": "k3s", | ||
"onAutoForward": "silent" | ||
}, | ||
"9083": { | ||
"label": "drasi", | ||
"onAutoForward": "silent" | ||
} | ||
} | ||
} |
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
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,5 +1,8 @@ | ||
To use the Drasi QuickStart Tutorial Dev Container | ||
# Getting Started with Drasi | ||
Follow the tutorial [instructions here](https://drasi.io/getting-started/). | ||
|
||
### Steps for running in VS Code with a Dev Container | ||
1. Open this directory in Visual Studio Code | ||
2. Open the Command Palette by typing `Ctrl + Shift + P` (windows) or `Cmd + Shift + P` (mac) | ||
3. Type 'dev containers:' | ||
4. Select 'Dev Containers: Rebuild and Reopen in Container' | ||
4. Select 'Dev Containers: Rebuild and Reopen in Container' |