Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

chore: fix github codesapce init (#11590)

liuyibde9abf664d8
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
deleted file mode 100644
index 7194d911ac..0000000000
--- a/.devcontainer/Dockerfile
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM mcr.microsoft.com/devcontainers/base:bookworm
-
-USER vscode
-# Install Homebrew For Linux
-RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && \
- eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" && \
- echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> /home/vscode/.zshrc && \
- echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> /home/vscode/.bashrc && \
- # Install Graphite
- brew install withgraphite/tap/graphite && gt --version
\ No newline at end of file
diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh
index fbe8a69b48..9642696b66 100644
--- a/.devcontainer/build.sh
+++ b/.devcontainer/build.sh
@@ -1,10 +1,6 @@
#!/bin/bash
# This is a script used by the devcontainer to build the project
-#Enable yarn
-corepack enable
-corepack prepare yarn@stable --activate
-
# install dependencies
yarn install
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 311619de35..bccbbf98b8 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,12 +1,16 @@
// For format details, see https://aka.ms/devcontainer.json.
{
- "name": "Debian",
+ "name": "AFFiNE Dev Container",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
+ "containerEnv": {
+ "COREPACK_ENABLE_DOWNLOAD_PROMPT": "0"
+ },
"features": {
"ghcr.io/devcontainers/features/node:1": {
- "version": "22"
+ "version": "lts",
+ "installYarnUsingApt": false
},
"ghcr.io/devcontainers/features/rust:1": {}
},
@@ -16,7 +20,7 @@
"extensions": [
"ms-playwright.playwright",
"esbenp.prettier-vscode",
- "streetsidesoftware.code-spell-checker"
+ "dbaeumer.vscode-eslint"
]
}
},
diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml
index ad9ffe1e6e..0a3bc9cd42 100644
--- a/.devcontainer/docker-compose.yml
+++ b/.devcontainer/docker-compose.yml
@@ -2,9 +2,7 @@ version: '3.8'
services:
app:
- build:
- context: .
- dockerfile: Dockerfile
+ image: mcr.microsoft.com/devcontainers/base:bookworm
volumes:
- ../..:/workspaces:cached
command: sleep infinity
@@ -24,8 +22,6 @@ services:
POSTGRES_DB: affine
redis:
image: redis
- ports:
- - 6379:6379
volumes:
postgres-data:
diff --git a/.devcontainer/setup-user.sh b/.devcontainer/setup-user.sh
index 21fd1c7cb3..5ee5dd1db2 100755
--- a/.devcontainer/setup-user.sh
+++ b/.devcontainer/setup-user.sh
@@ -1,9 +1,9 @@
set -e
+npm install -g @withgraphite/graphite-cli@stable
+
if [ -v GRAPHITE_TOKEN ];then
gt auth --token $GRAPHITE_TOKEN
fi
-git fetch origin canary:canary --depth=1
-git branch canary -t origin/canary
gt init --trunk canary