Giter Site home page Giter Site logo

artsy-hokusai-templates-1's Introduction

artsy-hokusai-templates

Templates for Hokusai-backed Projects

How to use this repository

Jinja template files for different application types should be managed in subdirectories within this repo.

Run hokusai setup with the --template-remote [email protected]:artsy/artsy-hokusai-templates.git --template-dir { target-directory } option to target a directory of templates in this repository. You can even specify a branch: --template-remote [email protected]:artsy/artsy-hokusai-templates.git#my-sick-branch --template-dir { target-directory }

Application developers can set up a project by specifying which target directory they want to use for templates by running hokusai setup with the --template-dir option.

tl;dr

Bootstrap a Rails/Puma project:

hokusai setup --template-remote [email protected]:artsy/artsy-hokusai-templates.git --template-dir rails-puma

Template directory structure

The default directory contains a basic configuration. Required files for a template directory are:

  • Dockerfile.j2
  • .dockerignore.j2
  • hokusai/build.yml.j2
  • hokusai/development.yml.j2
  • hokusai/test.yml.j2
  • hokusai/staging.yml.j2
  • hokusai/production.yml.j2

To create a new target-directory for a new application type, let's say Scala, run:

cp -R default scala

Then edit these template files for a Scala bootstrap configuration.

Any additional .j2 template files in the target directory and its child directories will be rendered with the provided template variables, and any other regular files will also be copied with the paths relative to the root of the project when running hokusai setup. Note the .circleci/config.yml file within the default configuration directory.

Template variables

All templates are rendered with project_name and project_repo template variables. You can reference them like so: {{ project_name }}.

hokusai setup also supports passing in template variables with the --var option. Users will get a warning if trying to render a template with a defined but unspecified variable.

CircleCI

CircleCI configuration is setup to use the shared artsy/hokusai orb. Using this requires updating an app's CircleCI settings to use version 2.1. See the hokusai orb documentation for details.

artsy-hokusai-templates-1's People

Contributors

dleve123 avatar eessex avatar izakp avatar joeyaghion avatar zephraph avatar

Watchers

 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.