Skip to content

domcloud/recipes

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

DOM Cloud Templates

These files are templates to install and host most common web frameworks to internet.

You can start deploy them for free on DOM Cloud.

Available templates currently:

CMS:

Frameworks:

You're free to submit PR about other popular frameworks.

Script Examples

To enable and enforce HTTPS:

features:
- ssl
nginx:
  ssl: enforce

To set root as ~/public_html/public/ and internally redirect all traffic to index.php:

root: public_html/public
nginx:
  locations:
  - match: /
    try_files: $uri $uri/ /index.php$is_args$args

To enable MySQL and create a default database:

features:
- mysql

To set root as ~/public_html/public/ and enable Passenger mode:

root: public_html/public
nginx:
  passenger:
    enabled: on

Script Specification

All install script templates uses YAML with following options:

source: <source url>
subdomain: <target subdomain>
directory: <directory to extract>
root: <webserver root>
nginx: <nginx configuration>
features:
- list of features
commands:
- list of shell commands

All props there is optional.

Source

This source url is full path to a ZIP somewhere in internet available for public, either starts from http:// or https://. If it's not a ZIP file, it'll not get executed.

You can also use repository URL from GitHub or GitLab (e.g. https://github.com/domcloud/dom-templates). It will do special URL modification to refer an actual path to ZIP file in master branch. If you want to download a branch other than master, append the branch name in hash-tag (.e.g https://github.com/domcloud/dom-templates#master)

If you append .git at the end of GitHub or GitLab URL. It will do git clone instead.

Remember that if you specify source, the current content get deleted. Use it with caution.

Directory

The name of directory inside the ZIP file to be extracted. If it's not provided, either it's guessing from github:// URI or not moving files out of a directory at all.

Root

The webserver root to serve. By default it's public_html. Usually for modern frameworks you put the root in public_html/public so that your server scripts don't get exposed.

Features

List of features of hosts that you need. Valid values are:

  • mysql, enable MySQL feature and create default database
  • postgres, enable PosgreSQL feature and create default database
  • ssl, enable HTTPS and attempt to validate domain to Let's Encrypt.

The default database name is the username postfixed with _db. If you want a different prefix then specify it like mysql app.

Commands

List of linux commands that you want to execute. Think like what commands you want to call using SSH. All commands here internally will be imploded with ;, also it has common subtitution to let you modify config files using sed -i:

  • ${DOMAIN} the domain name (without http:// prefix)
  • ${USERNAME} unix username (for host and database login)
  • ${PASSWORD} unix password (for host and database login)
  • ${DATABASE} default or given database name

Nginx

This is the setup needed for configuring Nginx file. See also available config for this option.

Embed Link

You can use this link format:

https://portal.domcloud.id/start?from=<fileurl>

where <fileurl> is URL to publicly accessible resource to YAML config. If that's file is in GitHub, you can use https://raw.githubusercontent.com/owner/repo/master/configfile.yml. Just remember to encode that URL so it can be imported properly.

Webhook

DOM Cloud provides public endpoint available to perform remote control for certain github events, this feature can be leveraged using GitHub action. Most of the time this feature is useful for keep syncing files between GitHub repo and files on DOM Cloud.

To begin setup the webhook, go to Deploy tab and write the commands you want to execute and click "Setup Webhook". You'll be prompted with this dialog:

image

Put this file in .github/workflows/domcloud.yml (can be any filename) and before you push it to GitHub, add these WEBHOOK_URL, WEBHOOK_SECRET, WEBHOOK_AUTH to Repository Secrets. Note you might need to change "main" to your repo's desired main branch.

Note if your host domain URL, username, or password is changed, then you need to update these variables accordingly. Maximum webhook calls is 5 times a hour for given host.

Limitation

The Freedom plan gives you free domain, 256 MB storage, 18 GB bandwidth a year, and 5 minutes (of new and re-) deployment time, and unlimited renewal per host. Of course these limitation can be increased if you're enrolling a subcription.

DOM Cloud is not like Docker or Heroku, which is immutable and container-based. All deployment here are mutable, you can edit it futher or relauch your deployment under the same host. More information here.

About

Install Script Templates for Deploying Popular Web Frameworks on DOM Cloud

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published