1.5.3 • Published 5 months ago

@jin7942/ray v1.5.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

RAY

npm version npm downloads license

ver: 1.5.1

한국어 README 보기

rayExample

A lightweight, no-nonsense CI/CD automation tool.

RAY clones your GitHub repo, runs your build command, builds a Docker image, and replaces containers with zero downtime — all from a simple JSON config. No YAML, no cloud vendor lock-in, just code that ships.

Features

  • Clone GitHub repositories
  • Docker image creation
  • Zero-downtime container replacement
  • JSON-based config file
  • CLI and library usage supported

Installation

npm install -g @jin7942/ray

CLI Usage

ray init               # Create default config file
ray init wizard        # Run interactive setup wizard
ray run                # Run all configured projects
ray run <project>      # Run a specific project
ray help               # Show help

Configuration Example (ray.config.json)

{
    "projects": [
        {
            "name": "my-app",
            "repo": "https://github.com/user/my-app.git",
            "branch": "main",
            "docker": {
                // Added support for docker-compose starting from v1.5.0.
                "type": "docker | compose",
                "image": "my-app-image",
                "containername": "my-app-container",
                "path": "./Dockerfile", // or "./docker-compose.yml"
                "network": ["net1", "net2"], // Added --network support for Docker containers
                "volumes": ["/host/path:/app/path", "/tmp/test:/app/test"] // Added support for Docker container volume mounts.
            },
            "internal": {
                "logdir": "./logs",
                "maxLogDirSize": 5242880,
                "logLevel": "info",
                "envFilePath": "./.env"
            }
        }
    ]
}

Dockerfile Example (Dockerfile)

FROM node:22-alpine AS builder

WORKDIR /app
COPY . .

RUN apk update && apk upgrade
RUN npm install
RUN npm run build

FROM node:22-alpine

WORKDIR /app

COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package.json .
COPY --from=builder /app/package-lock.json .

RUN apk add --no-cache git

RUN npm install --omit=dev

EXPOSE 7979

CMD ["node", "dist/server.js"]

You must write your build logic inside the Dockerfile. RAY does not run build commands anymore as of v1.2.0.

Library Usage

import { loadProjectConfig, runRayPipeline } from '@jin7942/ray';

const config = await loadProjectConfig('my-app');
await runRayPipeline(config);

API Reference

For documentation on the API, please see the following links:document

Requirements

  • Node.js 18+
  • Git installed
  • Docker installed and running

Simple Example

Want to see how to use RAY in a real server?

Check out RAY Auto Deploy Server — a lightweight webhook server that uses RAY for CI/CD automation.

Philosophy

Ray is a lightweight CI/CD tool designed to let anyone experience automated deployment without complex configuration. It minimizes setup and maximizes usability, making it easy to use even for students or beginner developers with little to no deployment experience.

Release History

VersionDateDescription
v1.0.02025-04-09Initial release. Core pipeline features complete
v1.1.02025-04-10Support for setting environment variables
v1.2.02025-04-11Supports external log directory mounting. Build process moved to Dockerfile
v1.3.02025-04-12Added --network support for ocker containers. Improved Git clone process
v1.4.02025-04-12Added support for Docker container volume mounts.
v1.5.02025-06-09Supports deployment using both Dockerfile and docker-compose

License

MIT

Contributing

This project is open source and welcomes contributions, suggestions, and feedback.

Links

1.5.3

5 months ago

1.5.2

5 months ago

1.5.1

5 months ago

1.5.0

5 months ago

1.4.5

7 months ago

1.4.4

7 months ago

1.4.3

7 months ago

1.4.2

7 months ago

1.4.1

7 months ago

1.4.0

7 months ago

1.3.1

7 months ago

1.3.0

7 months ago

1.2.0

7 months ago

1.1.0

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago