diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..378f490 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,8 @@ +FROM mcr.microsoft.com/devcontainers/typescript-node:24 + +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get install -y --no-install-recommends \ + docker.io \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* + +RUN npx playwright install --with-deps chromium \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..d873bc6 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,62 @@ +{ + "name": "Lazztech Boilerplate", + "build": { + "dockerfile": "Dockerfile" + }, + "features": { + "ghcr.io/devcontainers/features/docker-from-docker:1": { + "version": "latest" + } + }, + "forwardPorts": [3000], + "portsAttributes": { + "3000": { + "label": "NestJS App", + "onAutoForward": "notify" + } + }, + "remoteEnv": { + "DATABASE_TYPE": "sqlite" + }, + "postCreateCommand": "npm install", + "customizations": { + "vscode": { + "extensions": [ + "esbenp.prettier-vscode", + "dbaeumer.vscode-eslint", + "hbenl.vscode-test-explorer", + "bradlc.vscode-tailwindcss", + "otovo-oss.htmx-tags", + "eamodio.gitlens", + "hediet.vscode-drawio", + "ms-azuretools.vscode-docker", + "cweijan.vscode-database-client2", + "ms-azuretools.vscode-containers", + "bierner.markdown-mermaid", + "streetsidesoftware.code-spell-checker", + "ms-playwright.playwright", + "orta.vscode-jest" + ], + "settings": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact" + ], + "typescript.tsdk": "node_modules/typescript/lib", + "tailwindCSS.includeLanguages": { + "handlebars": "html" + } + } + } + }, + "mounts": [ + "source=lazztech-boilerplate-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume" + ] +} \ No newline at end of file diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4f9f830 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +node_modules +dist +data +.git +.github +.vscode +.devcontainer +*.md +*.log +.env.local +.env.*.local \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..48dd330 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Debug NestJS", + "runtimeExecutable": "npm", + "runtimeArgs": ["run", "start:debug"], + "console": "integratedTerminal", + "serverReadyAction": { + "pattern": "Nest application successfully started", + "uriFormat": "http://localhost:%s", + "action": "openExternally" + } + }, + { + "type": "node", + "request": "attach", + "name": "Attach to NestJS", + "port": 9229, + "restart": true, + "skipFiles": ["/**"] + } + ] +} \ No newline at end of file