-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
13,387 additions
and
10,089 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 |
---|---|---|
@@ -1,8 +1,16 @@ | ||
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-16 | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.231.5/containers/typescript-node/.devcontainer/base.Dockerfile | ||
|
||
# Install additional OS packages | ||
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster | ||
ARG VARIANT="16" | ||
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT} | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends fontconfig redis-server | ||
|
||
# Install NPM packages | ||
RUN su node -c "npm install -g pm2 git-cz pnpm" | ||
# [Optional] Uncomment if you want to install an additional version of node using nvm | ||
# ARG EXTRA_NODE_VERSION=16 | ||
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" | ||
|
||
# [Optional] Uncomment if you want to install more global node packages | ||
RUN su node -c "npm install -g pm2 git-cz" |
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,32 +1,62 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.5/containers/typescript-node | ||
{ | ||
"name": "Statsify", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
"dockerfile": "Dockerfile", | ||
// Update 'VARIANT' to pick a Node version: 16, 14, 12. | ||
// Append -bullseye or -buster to pin to an OS version. | ||
// Use -bullseye variants on local on arm64/Apple Silicon. | ||
"args": { | ||
"VARIANT": "16" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"vivaxy.vscode-conventional-commits", | ||
"mikestead.dotenv", | ||
"ms-azuretools.vscode-docker", | ||
"lokalise.i18n-ally", | ||
"gruntfuggly.todo-tree" | ||
] | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": ["source.organizeImports", "source.fixAll.eslint"], | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"[handlebars]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[css]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"explorer.experimental.fileNesting.patterns": { | ||
"package.json": "package-lock.json, .npmrc, yarn.lock, .yarnrc, pnpm-lock.yaml, tsconfig.*.json, tsconfig.json, jest.config.js, turbo.json, README.md, LICENSE, cliff.toml, .prettierrc, .eslintrc, .yarnrc.yml, .swcrc, .gitignore, .eslintignore, .env, .env.schema, renovate.json, .gitmodules" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
}, | ||
"runArgs": [ | ||
"--privileged" | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"christian-kohler.path-intellisense", | ||
"vivaxy.vscode-conventional-commits", | ||
"mikestead.dotenv", | ||
"ms-azuretools.vscode-docker", | ||
"eg2.vscode-npm-script", | ||
"christian-kohler.npm-intellisense" | ||
], | ||
"containerEnv": { | ||
"USE_POLLING": "true" | ||
}, | ||
|
||
"runArgs": ["--privileged"], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "/workspaces/statsify/.devcontainer/install.sh", | ||
|
||
"postStartCommand": "sudo /etc/init.d/redis-server start && yarn scripts apikey --nonInteractiveKeyCreation", | ||
|
||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "node", | ||
"postCreateCommand": "git submodule update --init && pnpm install && pnpm run build", | ||
"postStartCommand": "sudo /etc/init.d/redis-server start && git config core.autocrlf true && pnpm scripts api-key --nonInteractiveKeyCreation", | ||
"features": { | ||
"ghcr.io/devcontainers/features/git:1": {}, | ||
"ghcr.io/devcontainers/features/github-cli:1": {} | ||
"git": "latest", | ||
"github-cli": "latest" | ||
} | ||
} | ||
} |
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,2 @@ | ||
echo 'alias c=clear' >> ~/.zshrc | ||
yarn install |
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
Oops, something went wrong.