-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π§βπ» Add dev container (#447)
- Loading branch information
Showing
9 changed files
with
78 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"socialify": patch | ||
--- | ||
|
||
Set up dev container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ARG VARIANT="22-bookworm" | ||
|
||
FROM mcr.microsoft.com/devcontainers/typescript-node:1-${VARIANT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "Socialify Dev Environment", | ||
|
||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
|
||
"features": { | ||
"ghcr.io/devcontainers/features/github-cli:1": { | ||
"installDirectlyFromGitHubRelease": true, | ||
"version": "latest" | ||
} | ||
}, | ||
|
||
"forwardPorts": [3000], | ||
|
||
"containerEnv": { | ||
"NEXT_TELEMETRY_DISABLED": "1", | ||
"PNPM_HOME": "/home/node/.local/share/pnpm", | ||
"PNPM_STORE_DIR": "/home/node/.local/share/.pnpm-store" | ||
}, | ||
|
||
"postCreateCommand": "corepack install", | ||
|
||
"postStartCommand": ".devcontainer/post-start.sh", | ||
|
||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"GitHub.copilot", | ||
"biomejs.biome", | ||
"ms-playwright.playwright" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
if [ ! -f /home/node/.first_run ]; then | ||
git config --global --add safe.directory $(pwd) | ||
git config --global core.autocrlf true | ||
git config --global core.editor nano | ||
|
||
pnpm config set store-dir $PNPM_STORE_DIR | ||
pnpm install | ||
pnpm playwright:install | ||
|
||
if [ ! -f .env ]; then | ||
cp .env.example .env | ||
echo -e "\e[31mPlease fill in the .env file\e[0m" | ||
fi | ||
|
||
touch /home/node/.first_run | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
# gitmoji as a commit hook | ||
exec < /dev/tty | ||
npx gitmoji-cli --hook $1 $2 | ||
npx --yes gitmoji-cli --hook $1 $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"editor.defaultFormatter": "biomejs.biome", | ||
"editor.formatOnSave": true, | ||
"editor.tabSize": 2, | ||
"files.insertFinalNewline": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters