From 037363f9ee3f090acd12284da268cf3489815c9d Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 9 Nov 2022 18:51:25 +0000 Subject: [PATCH 1/5] support git and local changes in dev containers #7723 --- .devcontainer/devcontainer.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 41b8475ec..786d317a6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,12 +11,13 @@ "mounts": [ "source=freqtrade-bashhistory,target=/home/ftuser/commandhistory,type=volume" ], + "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/freqtrade,type=bind,consistency=cached", // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "ftuser", - "postCreateCommand": "freqtrade create-userdir --userdir user_data/", + "postCreateCommand": "ln -s /freqtrade/.env /workspaces/freqtrade/.env && freqtrade create-userdir --userdir user_data/", - "workspaceFolder": "/freqtrade/", + "workspaceFolder": "/workspaces/freqtrade", "settings": { "terminal.integrated.shell.linux": "/bin/bash", @@ -35,5 +36,6 @@ "davidanson.vscode-markdownlint", "ms-azuretools.vscode-docker", "vscode-icons-team.vscode-icons", + "github.copilot", ], } From 795328051346d23dc3390f434c089c4dd13ccfbf Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 9 Nov 2022 21:05:05 +0100 Subject: [PATCH 2/5] remove github.copilot extension --- .devcontainer/devcontainer.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 786d317a6..03adeacff 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,9 +15,7 @@ // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "ftuser", - "postCreateCommand": "ln -s /freqtrade/.env /workspaces/freqtrade/.env && freqtrade create-userdir --userdir user_data/", - - "workspaceFolder": "/workspaces/freqtrade", + "postCreateCommand": "ln -s /freqtrade/.env /workspaces/freqtrade/.env && freqtrade create-userdir --userdir user_data/", "settings": { "terminal.integrated.shell.linux": "/bin/bash", @@ -35,7 +33,6 @@ "ms-python.vscode-pylance", "davidanson.vscode-markdownlint", "ms-azuretools.vscode-docker", - "vscode-icons-team.vscode-icons", - "github.copilot", + "vscode-icons-team.vscode-icons", ], } From ec6ee7ead9fb3dc62d86eba4b7b3e28a4ff67a01 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 9 Nov 2022 21:06:14 +0100 Subject: [PATCH 3/5] remove empty space --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 03adeacff..18a818430 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "ftuser", - "postCreateCommand": "ln -s /freqtrade/.env /workspaces/freqtrade/.env && freqtrade create-userdir --userdir user_data/", + "postCreateCommand": "ln -s /freqtrade/.env /workspaces/freqtrade/.env && freqtrade create-userdir --userdir user_data/", "settings": { "terminal.integrated.shell.linux": "/bin/bash", @@ -33,6 +33,6 @@ "ms-python.vscode-pylance", "davidanson.vscode-markdownlint", "ms-azuretools.vscode-docker", - "vscode-icons-team.vscode-icons", + "vscode-icons-team.vscode-icons", ], } From be83e73411f08605682e0d614ca9266e6fd7f323 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 10 Nov 2022 08:42:47 +0000 Subject: [PATCH 4/5] add pip install --- .devcontainer/devcontainer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 18a818430..298ac07cc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,9 @@ // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "ftuser", - "postCreateCommand": "ln -s /freqtrade/.env /workspaces/freqtrade/.env && freqtrade create-userdir --userdir user_data/", + "postCreateCommand": "pip install --user -e . && freqtrade create-userdir --userdir user_data/", + + "workspaceFolder": "/workspaces/freqtrade", "settings": { "terminal.integrated.shell.linux": "/bin/bash", From 4664d5e1d8615879653e8e1328070d8735589f19 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 10 Nov 2022 18:56:19 +0000 Subject: [PATCH 5/5] Split installation to onCreateCommand --- .devcontainer/devcontainer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 298ac07cc..8fb643e8f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,8 @@ // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "ftuser", - "postCreateCommand": "pip install --user -e . && freqtrade create-userdir --userdir user_data/", + "onCreateCommand": "pip install --user -e .", + "postCreateCommand": "freqtrade create-userdir --userdir user_data/", "workspaceFolder": "/workspaces/freqtrade",