chore: fix github codesapce init (#11590)
This commit is contained in:
parent
8e1cbc4c5b
commit
bde9abf664
@ -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
|
|
@ -1,10 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This is a script used by the devcontainer to build the project
|
# This is a script used by the devcontainer to build the project
|
||||||
|
|
||||||
#Enable yarn
|
|
||||||
corepack enable
|
|
||||||
corepack prepare yarn@stable --activate
|
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
// For format details, see https://aka.ms/devcontainer.json.
|
// For format details, see https://aka.ms/devcontainer.json.
|
||||||
{
|
{
|
||||||
"name": "Debian",
|
"name": "AFFiNE Dev Container",
|
||||||
"dockerComposeFile": "docker-compose.yml",
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
"service": "app",
|
"service": "app",
|
||||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||||
|
"containerEnv": {
|
||||||
|
"COREPACK_ENABLE_DOWNLOAD_PROMPT": "0"
|
||||||
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/node:1": {
|
"ghcr.io/devcontainers/features/node:1": {
|
||||||
"version": "22"
|
"version": "lts",
|
||||||
|
"installYarnUsingApt": false
|
||||||
},
|
},
|
||||||
"ghcr.io/devcontainers/features/rust:1": {}
|
"ghcr.io/devcontainers/features/rust:1": {}
|
||||||
},
|
},
|
||||||
@ -16,7 +20,7 @@
|
|||||||
"extensions": [
|
"extensions": [
|
||||||
"ms-playwright.playwright",
|
"ms-playwright.playwright",
|
||||||
"esbenp.prettier-vscode",
|
"esbenp.prettier-vscode",
|
||||||
"streetsidesoftware.code-spell-checker"
|
"dbaeumer.vscode-eslint"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2,9 +2,7 @@ version: '3.8'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
image: mcr.microsoft.com/devcontainers/base:bookworm
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../..:/workspaces:cached
|
- ../..:/workspaces:cached
|
||||||
command: sleep infinity
|
command: sleep infinity
|
||||||
@ -24,8 +22,6 @@ services:
|
|||||||
POSTGRES_DB: affine
|
POSTGRES_DB: affine
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
ports:
|
|
||||||
- 6379:6379
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
npm install -g @withgraphite/graphite-cli@stable
|
||||||
|
|
||||||
if [ -v GRAPHITE_TOKEN ];then
|
if [ -v GRAPHITE_TOKEN ];then
|
||||||
gt auth --token $GRAPHITE_TOKEN
|
gt auth --token $GRAPHITE_TOKEN
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git fetch origin canary:canary --depth=1
|
|
||||||
git branch canary -t origin/canary
|
|
||||||
gt init --trunk canary
|
gt init --trunk canary
|
||||||
|
Loading…
x
Reference in New Issue
Block a user