Giter Site home page Giter Site logo

c100-heroku-terraform's Introduction

C100 Heroku Hosting

Terraform project to create the production environment for the C100 Family Justice application in Heroku:heroku.

Setup

To use this project, you need a Heroku API key. You can get this from the MoJ Digital Heroku account(credentials available from Rattic).

cp dotenv.example .env

Edit .env and update the environment variables, then;

source .env

You will also need to run the task to create the terraform workspaces - this lets terraform manage different states per environment:

`make create-workspaces`

Running tasks

The code is paramaterised, using an environment-specific config file (environments/{env name}/terraform.tfvars) to set appropriate values.

To run a task, you must provide an environment name, e.g.

# show intended plan of action on a particular environment (but don't actually do anything)
make demo plan
make staging plan
make prod plan

# actually make changes to an environment
make demo apply
make staging apply
make prod apply

# destroy an environment
make demo destroy
make staging destroy
make prod destroy

This will create your (empty) application on Heroku.

If you have created your application in the shared MoJ Heroku account, you may need to add your personal account as a collaborator, so that you can deploy your code without having to log in using the main MoJ Heroku credentials.

Deploying the application code

  • Set heroku environment variables
  • Add a new git remote for the application
  • git push [your remote] master

c100-heroku-terraform's People

Contributors

aldavidson avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

uk-gov-mirror

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.