Documentation

    PLEASE NOTE: This document applies to an unreleased version of rash. It is strongly recommended that you only use official releases of rash, as unreleased versions are subject to changes and incompatibilities that will not be supported in the official releases.

    If you are using an official release version of Rash, you should refer to the documentation for your specific version.

    Documentation for other releases can be found by using the version selector in the bottom left of any doc page.

    Getting started

    Simple YAML declarative shell scripting language based on modules and templates. rash syntax is inspired by Ansible.

    Quickstart

    To start using rash you just need a container with entrypoint. For install, add rash binary to your Dockerfile:

    FROM ghcr.io/rash-sh/rash AS rash
    FROM nginx
    COPY --from=rash /bin/rash /bin
    
    COPY entrypoint.rh /
    ENTRYPOINT ["/entrypoint.rh"]
    

    Also, you must create your first entrypoint.rh:

    #!/bin/rash
    - copy:
        content: |
          server {
            listen       80;
    
            {% for domain in env.DOMAINS | split(',') -%}
            {% set path = domain | split('.') | first -%}
            location /{{ path }} {
                rewrite /{{ path }}[/]?(.*) /$1 break;
                proxy_pass http://{{ domain }};
            }
            {% endfor %}
          }
        dest: /etc/nginx/conf.d/default.conf
    
    - command:
        argv: [nginx, '-g', 'daemon off;']
        transfer_pid: true
    

    Or instead, you could want to use rash for local scripting. In that case you can follow our installation guide.

    Syntax

    YAML syntax based on modules.

    Besides, rash includes MiniJinja templates which you can use anywhere. You can use all its functions and combine them as you want.

    rash implements custom builtins, too. For example, {{ rash.path }} or {{ env.MY_ENV_VAR }}.