Skip to content

cloud-cli/image-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js image

This is a Node.js base image for Cloudy, based on the latest LTS version of node, running on Alpine Linux.

Usage

Create a Dockerfile

FROM ghcr.io/cloud-cli/node
ADD . /home/app

Build an app

docker build -t app-image .
docker run --rm app-image

As a static server

Create a superstatic.json file to add configurations

As a Node.js app

Add an entry to package.json with the main field pointing to the app's entrypoint

Zero-config

Having a index.js present is enough to start the app. Also works with index.cjs and index.mjs

Procfile

If a Procfile is present, foreman is used to start the processes.

Import maps

If import-map.json is defined in the app root folder, the same logic as Import Maps is used to load modules.