{"id":21270705,"url":"https://github.com/explodingcamera/ship-es","last_synced_at":"2025-10-02T23:35:17.318Z","repository":{"id":57358481,"uuid":"456886636","full_name":"explodingcamera/ship-es","owner":"explodingcamera","description":"Quickly bundle, containerize and deploy JavaScript and TypeScript server-side projects","archived":false,"fork":false,"pushed_at":"2022-10-10T22:37:48.000Z","size":509,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T03:36:31.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/explodingcamera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-08T10:33:17.000Z","updated_at":"2024-03-04T15:46:12.000Z","dependencies_parsed_at":"2022-09-06T22:21:32.248Z","dependency_job_id":null,"html_url":"https://github.com/explodingcamera/ship-es","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explodingcamera%2Fship-es","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explodingcamera%2Fship-es/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explodingcamera%2Fship-es/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explodingcamera%2Fship-es/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/explodingcamera","download_url":"https://codeload.github.com/explodingcamera/ship-es/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235050731,"owners_count":18928014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-21T08:18:21.762Z","updated_at":"2025-10-02T23:35:16.990Z","avatar_url":"https://github.com/explodingcamera.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ship-es \u003ca href=\"https://www.npmjs.com/package/ship-es\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/ship-es?style=flat\u0026colorA=000000\u0026colorB =000000\"/\u003e\u003c/a\u003e\n\n\u003e Quickly bundle, containerize and deploy JavaScript and TypeScript server-side projects\n\n`ship-es` enables you to quickly build your `node.js` code and deploy it as a tiny docker image, all with a single command and no required configuration.\nGreat for anything from Webservers to Chatbots.\n\n# setup\n\n`ship-es` works without any configuration by default.\n\n```bash\n# create new node.js project\n$ pnpm init \u0026\u0026 pnpm i -D ship-es\n\n# write code\n$ echo \"console.log('hello world')\" \u003e index.ts\n\n# run your project locally\n$ pnpx ship-es dev ./index.ts\n\n# push your code to a container registry (in this case docker.io)\n$ pnpx ship-es ship ./index.ts explodingcamera/myproject\n```\n\n\u003e using pnpm is reccommended. You can substiture this for your package manager of choice, e.g `npm` or `yarn`\n\nBelow, we've provided a simple GitHub Workflow file to automatically build new commits pushed to your `main` branch and push them as a container to GitHub's Container Registry.\n\n## CI/CD\n\nShip-es doesn't depend on any platform specific code. Just either `docker`, `podman` or `nerdctl` needs to be installed.\n\n### GitHub Actions\n\n`.github/workflows/deploy.yml`\n\n```yaml\nname: Deploy\n\n# We want this to run on all commits to `main`\non:\n  push:\n    branches:\n      - main\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n\n      # Install node.js\n      - uses: actions/setup-node@v2\n        with:\n          node-version: \"17\"\n\n      # Install pnpm, our recommended package manager (will increase speed by a lot)\n      - uses: pnpm/action-setup@v2.1.0\n        with:\n          version: 6.0.2\n\n      # Authenticate with container registry\n      - uses: docker/login-action@v1\n        with:\n          registry: ghcr.io\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      # Build \u0026 push container image\n      - name: Deploy\n        run: |\n          pnpm install\n          pnpx ship-es ./index.ts ghcr.io/username/project --push\n```\n\n## configuration\n\nTo customize your deployment there are variety of options:\n\n- `--push` Push the image to your container registry after building it\n\n- **versioning**\\\n   When using these flags, `ship-es` will by default use the version number you provide in the package.json file located in your current working directory.\n\n  - `--tag`: Override Tag, can be used multiple times\n  - `--release` Tag with `stable`, `x.x.x`, `x.x` and `x` (based on your `package.json`)\n  - `--verison`: Override version used by release\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n\n- **bundling**\n  - `--external`: By default, `ship-es` bundles all of your packages into a single file to minimize their filesize and impove compatibility and start-up-performance. This might lead to issues with packages that access external files or depend on native code. To use these, add them using the `--external` flag (can be specfied multiple times and supports glob patterns). **Only packages marked as external will be included in your generated image!**\n  - `--static`: To include specific folders in the final build (like a `public/` folder with static assets), add these using `--static ./public`.\n\n## api\n\n`ship-es` was build to also be used programatically by other projects as a base. Documentation on this will follow soon.\n\n## Related Projects\n\n- [snowstorm](https://github.com/explodingcamera/snowstorm) - The lightning-fast and minimalist React Tool\n- [fnkit (soon to be release)](https://github.com/explodingcamera/fnkit) - The serverless experience with servers (based on `ship-es`)\n\n## Tools used by ship-es\n\n`ship-es` is not build to be a catch-all solution for complex deployment pipelines, rather it is a simple starting point and alternative to the huge amount of boilerplate code required to deploy a simple project. Below are the libraries `ship-es` uses internally that you could also use to build more complex setups:\n\n- [kaniko](https://github.com/GoogleContainerTools/kaniko) - A userspace Dockerfile build-tool\n- [esbuild](https://github.com/evanw/esbuild) - A JavaScript/Typescipt bundler/minifier written in Go\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplodingcamera%2Fship-es","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexplodingcamera%2Fship-es","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplodingcamera%2Fship-es/lists"}