From 455a4b7e13fcf7312575765b9d0449ccc8723129 Mon Sep 17 00:00:00 2001 From: Ry0taK <49341894+Ry0taK@users.noreply.github.com> Date: Mon, 13 Feb 2023 19:48:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Dev=20Container=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 4 ++-- .devcontainer/docker-compose.yml | 7 ++++--- .devcontainer/init.sh | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e92f9dff7812..fde7ec0f2bae 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,10 +2,10 @@ "name": "Misskey", "dockerComposeFile": "docker-compose.yml", "service": "app", - "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "workspaceFolder": "/workspace", "features": { "ghcr.io/devcontainers-contrib/features/pnpm:2": {} }, "forwardPorts": [3000], - "postCreateCommand": ".devcontainer/init.sh" + "postCreateCommand": "sudo chmod 755 .devcontainer/init.sh && .devcontainer/init.sh" } diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 6cb21844acf8..6ec3c86a4a44 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -7,7 +7,7 @@ services: dockerfile: Dockerfile volumes: - - ../..:/workspaces:cached + - ../:/workspace:cached command: sleep infinity @@ -21,7 +21,7 @@ services: networks: - internal_network volumes: - - ../redis:/data + - redis-data:/data healthcheck: test: "redis-cli ping" interval: 5s @@ -37,7 +37,7 @@ services: POSTGRES_PASSWORD: postgres POSTGRES_DB: misskey volumes: - - ../db:/var/lib/postgresql/data + - postgres-data:/var/lib/postgresql/data healthcheck: test: "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" interval: 5s @@ -45,6 +45,7 @@ services: volumes: postgres-data: + redis-data: networks: internal_network: diff --git a/.devcontainer/init.sh b/.devcontainer/init.sh index 552b229fa51e..450c3920c320 100755 --- a/.devcontainer/init.sh +++ b/.devcontainer/init.sh @@ -2,6 +2,7 @@ set -xe +sudo chown -R node /workspace git submodule update --init pnpm install --frozen-lockfile cp .devcontainer/devcontainer.yml .config/default.yml From 44188c1ad3f8836ba44d537a8418c60b2368dd66 Mon Sep 17 00:00:00 2001 From: Ry0taK <49341894+Ry0taK@users.noreply.github.com> Date: Mon, 13 Feb 2023 21:35:17 +0900 Subject: [PATCH 2/3] =?UTF-8?q?CONTRIBUTING.md=E3=81=ABDev=20Container?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=99=82=E3=81=AE=E6=B3=A8=E6=84=8F=E6=9B=B8?= =?UTF-8?q?=E3=81=8D=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index de0a1abb459f..67c2b536cc6d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -114,6 +114,7 @@ command. ### Dev Container Instead of running `pnpm` locally, you can use Dev Container to set up your development environment. To use Dev Container, open the project directory on VSCode with Dev Containers installed. +**Note:** If you are using Windows, please clone the repository with WSL. Using Git for Windows will result in broken files due to the difference in how newlines are handled. It will run the following command automatically inside the container. ``` bash From 5f046fc874318f81f5c60c8e29219a42367cd475 Mon Sep 17 00:00:00 2001 From: Ry0taK <49341894+Ry0taK@users.noreply.github.com> Date: Mon, 13 Feb 2023 21:36:11 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B3=A8=E6=84=8F=E6=9B=B8=E3=81=8D?= =?UTF-8?q?=E3=82=92=E6=94=B9=E8=A1=8C=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 67c2b536cc6d..48d8a40deae2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -113,7 +113,7 @@ command. ### Dev Container Instead of running `pnpm` locally, you can use Dev Container to set up your development environment. -To use Dev Container, open the project directory on VSCode with Dev Containers installed. +To use Dev Container, open the project directory on VSCode with Dev Containers installed. **Note:** If you are using Windows, please clone the repository with WSL. Using Git for Windows will result in broken files due to the difference in how newlines are handled. It will run the following command automatically inside the container.