From 80dc3858536e76e1507be3ce28d864ebab7e2ce4 Mon Sep 17 00:00:00 2001 From: Frinze Erin Lapuz Date: Mon, 28 Oct 2024 18:00:36 +0800 Subject: [PATCH 1/5] NONE Example Docs --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 68d697f..7f70048 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,11 @@ To use this, do the following: or just open the command palette and type "Reopen in Container". +Example of how we use this: + +- see [django-nextjs-template](https://github.com/codersforcauses/django-nextjs-template). +- see [django-workshop](https://github.com/CodersforLearning/django-workshop-winter-2024) + ### Setups There's a folder called `cfc-devenv-base` that defines the base image for development environment. We prebuild this image in the CI (github actions), the reason why we do this is so that the developer environment just gets downloaded rather than built in the developer machine. From 6e67a68d186c77a847b0af64eb22d64787a0a61c Mon Sep 17 00:00:00 2001 From: Frinze Erin Lapuz Date: Mon, 28 Oct 2024 18:00:49 +0800 Subject: [PATCH 2/5] NONE Post Create Command for Safe directory --- .devcontainer/devcontainer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 395daca..c510aa9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,9 +14,11 @@ }, // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [3000, 8000, 8080] + "forwardPorts": [3000, 8000, 8080], // Use 'postCreateCommand' to run commands after the container is created. // Note: Useful for when they open it and want everything to just start // "postCreateCommand": "docker compose up -d && yarn dev" + + "onCreateCommand": "git config --global --add safe.directory /workspace" } From 0b35a4eacef9adef00b0c417b1e21a61f6b67696 Mon Sep 17 00:00:00 2001 From: Frinze Erin Lapuz Date: Mon, 28 Oct 2024 18:00:59 +0800 Subject: [PATCH 3/5] NONE Debugger Preinstalled in container --- cfc-devenv-base/.devcontainer/devcontainer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cfc-devenv-base/.devcontainer/devcontainer.json b/cfc-devenv-base/.devcontainer/devcontainer.json index 276281f..f0df44c 100644 --- a/cfc-devenv-base/.devcontainer/devcontainer.json +++ b/cfc-devenv-base/.devcontainer/devcontainer.json @@ -79,7 +79,10 @@ "YoavBls.pretty-ts-errors", "meganrogge.template-string-converter", "yoavbls.pretty-ts-errors", - "cweijan.vscode-database-client2" + "cweijan.vscode-database-client2", + // For debuggers + "ms-vscode.js-debug", + "ms-python.debugpy" ], "settings": { "terminal.integrated.defaultProfile.linux": "zsh", From 463db4e28ff69683897540285b44f61165f091c0 Mon Sep 17 00:00:00 2001 From: Frinze Erin Lapuz Date: Mon, 28 Oct 2024 18:15:47 +0800 Subject: [PATCH 4/5] Click to open in Remote containers --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7f70048..7509d43 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ This is the repository that contains the automated development environment setup ## CFC-Devenv +[![Open in Remote - Containers](https://img.shields.io/static/v1?label=Remote%20-%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/codersforcauses/automated-setup) + CFC-Devenv, also known as "Coders for Causes - Developer Environment" is the automated development environment setup for Coders For Causes developer machine. With only having 2 prerequisite: From 52c2faa02dceb47c49cbe95bf94f5fd9945a795b Mon Sep 17 00:00:00 2001 From: Frinze Erin Lapuz Date: Mon, 28 Oct 2024 20:49:03 +0800 Subject: [PATCH 5/5] fix stuff --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c510aa9..6dc843c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,5 +20,5 @@ // Note: Useful for when they open it and want everything to just start // "postCreateCommand": "docker compose up -d && yarn dev" - "onCreateCommand": "git config --global --add safe.directory /workspace" + "onCreateCommand": "git config --global --add safe.directory ." }