0.0.1-alpha.16 • Published 6 months ago

hosty v0.0.1-alpha.16

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

Hosty

A code based opinionated way to self-host and manage web apps.

Quick Example

import {app, db, deploy, run} from 'hosty'

// 1. Specify what you want to deploy

// A postgres database
const database = db.postgres({
  name: 'my-db',
  user: 'db_user',
  pass: 'db_pass'
})

// An application from a Git repo
const api = app.git({
  name: 'my-api',
  repo: 'https://url-to-my-repo.git',
  branch: 'main',
  domain: 'my-api-domain.com',
  env: {
    PORT: '80',
    DB_HOST: database.host,
    DB_USER: database.user,
    DB_PASS: database.pass,
    DB_NAME: database.name,
  },
})

// 2. Specify where you want deploy
const myVPS = server({
  name: '188.114.97.6' // hostname or IP
})

// 3. Deploy
deploy(myVPS, database, api)
run()

This code will do the following: 1. Connect to your server via SSH 2. Create the postgres database 3. Clone your repo, build and run it 4. Configure the domain with https support

Requirements

On local machine:

  • Ansible (tested with v2.16.6)
  • Nodejs (tested with v22.8)

On the server

  • A Linux server that uses apt and systemctl (tested on Ubuntu 22.04)
  • A user with sudo ability (using the root user is not recommended)

The detailed documentation is coming soon ...

0.0.1-alpha.16

6 months ago

0.0.1-alpha.12

10 months ago

0.0.1-alpha.11

10 months ago

0.0.1-alpha.14

9 months ago

0.0.1-alpha.13

10 months ago

0.0.1-alpha.15

9 months ago

0.0.1-alpha.10

10 months ago

0.0.1-alpha.8

10 months ago

0.0.1-alpha.9

10 months ago

0.0.1-alpha.6

10 months ago

0.0.1-alpha.7

10 months ago

0.0.1-alpha.4

10 months ago

0.0.1-alpha.5

10 months ago

0.0.1-alpha.3

10 months ago

0.0.1-alpha.2

1 year ago

0.0.1-alpha

1 year ago

0.0.3

13 years ago

0.0.1

13 years ago