From 6fcad07180d3f0214e2b4ad72d4eb7f640677e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Jaro=C5=A1?= Date: Thu, 16 Nov 2023 13:05:41 +0100 Subject: [PATCH] Add devcontainer --- .devcontainer/Dockerfile | 3 +++ .devcontainer/devcontainer.json | 17 +++++++++++++++++ .devcontainer/docker-compose.yml | 18 ++++++++++++++++++ .env | 1 + 4 files changed, 39 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yml create mode 100644 .env diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..34f0d04 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,3 @@ +FROM local/nodejs/dev:18 + +USER node \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..29f19c1 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,17 @@ +{ + "name": "seedling", + "workspaceFolder": "/home/project/seedling", + "dockerComposeFile": "docker-compose.yml", + "service": "seedling", + "postCreateCommand": "sudo chown node:node -R /home/project", + "customizations": { + "vscode": { + "extensions": [ + "Fooxly.themeswitch", + "EditorConfig.EditorConfig", + "rvest.vs-code-prettier-eslint", + "wix.vscode-import-cost" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000..56f1ae1 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,18 @@ +version: "3" + +name: seedling + +volumes: + node_modules: + pnpm-store: + +services: + seedling: + build: + context: . + container_name: seedling + volumes: + - ../:/home/project/seedling + - node_modules:/home/project/seedling/node_modules + - pnpm-store:/home/project/seedling/.pnpm-store + command: sleep infinity \ No newline at end of file diff --git a/.env b/.env new file mode 100644 index 0000000..a32a0fe --- /dev/null +++ b/.env @@ -0,0 +1 @@ +COMPOSE_PROJECT_NAME=seedling \ No newline at end of file