{"id":23081273,"url":"https://github.com/lagden/boilerplate-bin","last_synced_at":"2026-04-13T11:02:00.129Z","repository":{"id":38775472,"uuid":"315513305","full_name":"lagden/boilerplate-bin","owner":"lagden","description":"Boilerplate com Bourne Shell script, Bourne-Again Shell script e Node.js script.","archived":false,"fork":false,"pushed_at":"2024-08-07T02:04:58.000Z","size":112,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T14:15:17.847Z","etag":null,"topics":["bash","bin","boilerplate","nodejs","sh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lagden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-24T03:58:33.000Z","updated_at":"2024-08-07T02:05:01.000Z","dependencies_parsed_at":"2024-08-07T06:25:09.968Z","dependency_job_id":"6d49b2bf-6c8b-4f87-923f-469cd689729d","html_url":"https://github.com/lagden/boilerplate-bin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lagden/boilerplate-bin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fboilerplate-bin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fboilerplate-bin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fboilerplate-bin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fboilerplate-bin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lagden","download_url":"https://codeload.github.com/lagden/boilerplate-bin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fboilerplate-bin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31749763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bin","boilerplate","nodejs","sh"],"created_at":"2024-12-16T13:50:49.709Z","updated_at":"2026-04-13T11:02:00.104Z","avatar_url":"https://github.com/lagden.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boilerplate Bin\n\nPode ser utilizado nos projetos:\n\n- [Boilerplate Rest](https://github.com/lagden/boilerplate-rest)\n- [Boilerplate GraphQL](https://github.com/lagden/boilerplate-gql)\n- [Boilerplate Websocket](https://github.com/lagden/boilerplate-ws)\n- [Boilerplate Svelte](https://github.com/lagden/boilerplate-svelte)\n\n\n## Como usar\n\nUtilize `@tadashi/boilerplate-create` para iniciar o projeto.\n\n```\nnpm i -g @tadashi/boilerplate-create\nboilerplate-create\n```\n\nou\n\n```\nnpx --yes @tadashi/boilerplate-create\n```\n\nE siga as instruções do prompt.\n\n\n## Scripts\n\nÍndice:\n\n- [Docker](#docker)\n    - [deploy](#deploy)\n    - [image](#image)\n    - [image_ci](#image_ci)\n    - [start](#start)\n    - [stop](#stop)\n    - [test](#test)\n- [Helper](#helper)\n    - [fn](#fn)\n    - [wait](#wait)\n- [Local](#local)\n    - [start](#start-1)\n    - [test](#test)\n- [Node](#Node)\n    - [build](#build)\n    - [pkg.js](#pkg.js)\n    - [zera](#zera)\n\n---\n\n### Docker\n\n#### deploy\n\nO fluxo do **deploy**:\n\n1. Carrega as variáveis de ambiente\n2. Executa o script `image`\n3. Cria o arquivo `docker-compose-{VERSION}.yml`\n4. Sincroniza os arquivos com o servidor\n5. Executa o `docker stack deploy` no servidor\n\n\n```\nUsage: deploy [options...]\n\nOptions:\n  -e \u003cstaging|production\u003e Environment\n  -i                      Ignore build image\n  -h                      Show usage\n```\n\n\n#### image\n\nCria a imagem do projeto e faz um `push` para o **resgistry**.\n\n\n```\nUsage: image [options...]\n\nOptions:\n  -e \u003cstaging|production\u003e Environment\n  -h                      Show usage\n```\n\n\n#### image_ci\n\nCria a imagem do projeto via CI/CD\n\n\n```\nUsage: image_ci [options...]\n\nOptions:\n  -e \u003cstaging|production\u003e Environment\n  -h                      Show usage\n```\n\n\n#### start\n\nInicia o stack de **desenvolvimento** via **docker**.\n\n```\nUsage: start [options...]\n\nOptions:\n  -b            Build image\n  -d            Run containers in the background\n  -h            Show usage\n```\n\n\n#### stop\n\nEncerra o stack que foi inicializado via **docker** pelo script `start`.\n\n\n#### test\n\nExecuta o teste do stack via **docker**\n\n```\nUsage: test [options...]\n\nOptions:\n  -s \u003cservice\u003e  Get exit code from service\n  -b            Build image\n  -h            Show usage\n```\n\n\n### Helper\n\n#### fn\n\nMétodos utilizados pelos scripts.\n\n\n#### wait\n\nEsse script é para garantir que os outros serviços estejam rodando antes de iniciar a aplicação.  \nVeja o exemplo abaixo:\n\n```yml\ncommand: \u003e\n  /bin/ash -c \"\n    bin/helper/wait db:3456;\n    node server\n  \"\n```\n\nA aplicação só irá iniciar quando o serviço `db` estiver respondendo na porta `3456`.\n\n\n### Local\n\n#### start\n\nCarrega as variáveis de ambiente de **desenvolvimento** e inicia a aplicação.\n\n```\nUsage: $0 [options...]\n\nOptions:\n  -e \u003cdevelopment|staging|production\u003e  Environment\n  -b                                   Build and run the application\n  -i                                   Ignore run\n  -h                                   Show usage\n```\n\n\n#### test\n\nCarrega as variáveis de ambiente de **teste** e executa o teste da aplicação.\n\n\n### Node\n\n#### build\n\nEsse script é utilizado geralmente em aplicações frontend.  \nEle executa o `build` da aplicação dentro do **Dockerfile**\n\n\n#### pkg.js\n\nAtualiza para última versão todas as `dependencies` e `devDependencies` do arquivo **package.json**.  \nMas é preciso que seja instalado novamente via **npm**, **yarn** ou **pnpm**.\n\n\n#### zera\n\nLimpa todos os pacotes e reinstala novamente via **npm**, **yarn** ou **pnpm**.\n\n\n```\n  Usage: $0 [options...]\n\n  Options:\n    -m, --manager \u003cmanager\u003e  Package manager: npm (default), yarn or pnpm\n    -s, --shame              Shamefully hoist (only pnpm)\n    -h, --help               Show usage\n```\n\n\n---\n\n\n## License\n\nMIT © [Thiago Lagden](https://github.com/lagden)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagden%2Fboilerplate-bin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flagden%2Fboilerplate-bin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagden%2Fboilerplate-bin/lists"}