Giter Club home page Giter Club logo

init's Introduction

PlaceOS Init Container

A set of scripts for initialization of PlaceOS.

Usage

The scripts are methods wrapped by a sam.cr interface. Most use named arguments which are used as described here.

Execute scripts as one-off container jobs.

Example

# Create a set of placeholder documents
docker run -it placeos/init make sam create:placeholder
# Create an Authority
docker run -it placeos/init make sam create:authority domain="localhost:8080"
# Create a User
docker run -it placeos/init make sam create:user \
                                     authority_id="s0mek1nd4UUID" \
                                     email="[email protected]" \
                                     username="burger" \
                                     password="burgerR00lz" \
                                     sys_admin=true \
                                     support=true

Container Entrypoint

The default entrypoint to the container generates a User, Authority, and Application dependent on the environment variables below.

  • email: PLACE_EMAIL, required.
  • username: PLACE_USERNAME, required.
  • password: PLACE_PASSWORD, required.
  • application_name: PLACE_APPLICATION || "backoffice"
  • domain: PLACE_DOMAIN || "localhost:8080"
  • tls: PLACE_TLS == "true"
  • auth_host: PLACE_AUTH_HOST || "auth"
  • development: ENV == "development"

Scripts

  • create:placeholders: Creates a representative set of documents in RethinkDB

  • create:authority: Creates an Authority

    • domain: Defaults to PLACE_DOMAIN || "localhost:8080"
    • tls: Defaults to PLACE_TLS || false
  • create:application: Creates an Application

    • authority: Authority ID. Required.
    • base: Defaults to "http://localhost:8080"
    • name: Defaults to "backoffice"
    • redirect_uri: Defaults to "#{base}/#{name}/oauth-resp.html"
    • scope: Defaults to "public"
  • create:user: Creates a User

    • authority_id: Id of Authority. Required.
    • email: Email of user. Required.
    • username: Username of user. Required.
    • password: Password of user. Required.
    • sys_admin: Defaults to false
    • support: Defaults to false
  • drop: Drops Elasticsearch and RethinkDB

    • Runs drop:elastic and drop:db via environmental configuration
  • drop:elastic: Deletes all elastic indices tables

    • host: Defaults to ES_HOST || "localhost"
    • port: Defaults to ES_PORT || 9200
  • drop:db: Drops all RethinkDB tables

    • host: Defaults to RETHINKDB_HOST || "localhost"
    • port: Defaults to RETHINKDB_PORT || 28015
    • user: Defaults to RETHINKDB_USER || "admin"
    • password: Defaults to RETHINKDB_PASS || ""

Development

  • Create a function in a relevant file under src/tasks
  • Write the sam binding in src/sam.cr
  • Document it

init's People

Contributors

caspiano avatar kimburgess avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.