AppBucket: A PaaS for Glitch

appbucket


This is appbucket, the first PaaS (Platform as a service) on Glitch. So bascially Glitch on Glitch without the editor. You can create a bunch of projects (a.k.a apps) with multiple custom domains (as Glitch supports that now). So you can have many servers on diffrent ports, and you can access them from port 80.

Demos:

appbucket-demo-1.baby-yoda.xyz
appbucket-demo-2.baby-yoda.xyz

They are both connected to the same project and is running two different servers (one on 8080 and 7777). It’s powered by Nginx (for the reverse proxy) and Node.js
for the CLI.

screenshot of both domains

Commands:

node cli ls:

List all buckets registered. Should display as a table.

node cli create "domain.tld" <port> "start command":


Create a new bucket. The example above will create a new folder to store your app (in this case ./app/domain.tld) with domain.tld and will foward `` and on run, it will run "start command"

node cli delete domain.tld

Deletes the bucket domain.tld. This does not delete the folder (allowing you to save your data).

Setup

By default, it comes with the default domains.

You should remove them by running the following commands:

rm -r apps
node cli delete appbucket-demo-1.baby-yoda.xyz
node cli delete appbucket-demo-2.baby-yoda.xyz

And create a new app:

node cli create "subdomain.domain.tld" 8080 "some server command that listens to port 8080"

Basically, this means appbucket will create a new app (./app/subdomain.domain.tld), and on startup will run some server command that listens to port 8080 and will forward port 8080 to subdomain.domain.tld. This isn’t valid config, please change it.

Source: Glitch :・゚✧ (will be unprivated soon)

Edit: @khalby786 updated jsoning so it will work with Glitch again due to glitch wiping the node_modules foder. Domains will no longer be wiped on a refresh/project waking up.

5 Likes

I unprivated the project

Neat! Just wanted to note that you should update the file extension for the manpages. File extensions in roff are by section, ie:

create.1
delete.2
ls.3

Thanks, I’ll update them.

1 Like

A little more background information I’d like to post. Back when I was working on the Xent project, I resolved to use a reverse proxy in between the static site and the domain so it could be sacrficed in an event of a DDoS attack. Also, Xent had a documentation project that I also wanted to link together. For this, I thought it’d just be simple to decide with the Host header, however in those days the custom domains had some weird issues, one of them being the host header not being present. Eventually with one of the other issues I got, this was fixed sometime this year making us able to show different content based on domain using projects like this.

Hey, would this work on something like… Repl?

It’s a Glitch project with nginx built in so I’m not sure. You could download nginx and run it and modify the path but I’m not sure if it would run on repl

I don’t think they have nginx installed in repl.it, so probably not.

You technically could download the binaries as nginx does not need sudo to operate

1 Like

Also, this project is broken until @khalby786 updates jsoning to not use node_modules

4 Likes

It’s fixed now, and I believe you’ve already updated the original post. :smiley:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.