Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evanshortiss/sea-nodejs
https://github.com/evanshortiss/sea-nodejs
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/evanshortiss/sea-nodejs
- Owner: evanshortiss
- Created: 2023-04-20T00:33:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-20T18:16:23.000Z (over 1 year ago)
- Last Synced: 2024-04-09T13:09:30.435Z (7 months ago)
- Language: Dockerfile
- Size: 24.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Containerized Node.js SEA (Single Executable Application) Example
Demonstrates how a TypeScript application can be packaged into a Node.js
Single Executable Application, and packaged as container image.### Local Development
## Building
Use `docker` or `podman`:
```bash
podman build . -f Containerfile -t sea-nodejs-example
```## Running
```bash
podman run --rm -p 8080:8080 sea-nodejs-example
```You can now access http://localhost:8080 and receive a "Hello, World" response.
### Deploy on Kubernetes
Use the *k8s/deployment.yaml* to deploy a pre-built version of the application on a Kubernetes cluster.
If you'd like to use your own build, you'll need to:
1. Use the `podman build` step above, and use a tag you can push to, e.g `quay.io/your-username/sea-nodejs-example`.
1. Push your tag, i.e `podman push quay.io/your-username/sea-nodejs-example`.
1. Update *k8s/deployment.yaml* to reference your version of the image.
1. Apply the Deployment YAML to your Kubernetes cluster.