Code Monkey home page Code Monkey logo

micro-api's Introduction

micro-api demo application

This is the back-end of a simple 2-tier app to demonstrate deploying [Docker] (www.docker.com)-based application on [AWS Elastic Beanstalk] (aws.amazon.com/elasticbeanstalk) through Shippable. To see the full functionality of the app, use the same steps to deploy the front-end of the app which is also on Aye0Aye called micro-www.

When this sample repo is enabled in Shippable, the CI process performs the following:

  • Uses Docker to build the CI environment from a Dockerfile, pulling the base image from public Docker Hub repository "aye0aye/micro-image"
  • Executes some basic CI tests
  • Stores the test results and code coverage report
  • Upon successful CI build:
    • Pushes the newly built Docker image to Docker Hub repository "aye0aye/micro-api"
    • Deploys the new image to an Elastic Beanstalk application

Optional environment variables required for application:

  • API_PORT: Port used for app (default:80)
  • LOG_LEVEL: Specifies log level for Winston console (silly, debug, verbose, info, warn, error). This microservice uses info and error messages only.
  • SHUD_LOG_TO_FILE: true or false, specifies whether to save logs to logs.log

Environment variables required for deploying to Elastic Beanstalk

Before beginning, create a new application and environment in Elastic Beanstalk using the instructions available here.

In the shippable.yml, change the following values based on your EB application:

  • AWS_EB_APPLICATION:yourElasticBeanstalkApplicationName
  • AWS_EB_ENVIRONMENT=yourElasticBeanstalkEnvironmentName
  • AWS_S3_BUCKET=yourS3BucketName
  • AWS_S3_FOLDER=yourS3FolderName to upload deployment config files
  • AWS_REGION=yourPreferredAwsRegion
  • REGISTRY_ACCOUNT=yourDockerRegistryAccount
    • Note that this can be the account/registry URL for any valid Docker Registry
  • ACCOUNT_IDENTIFIER=shippable.$REGISTRY_ACCOUNT
    • No changes needed
  • AWS_DEPLOY_JSON=Dockerrun.aws.json.$ACCOUNT_IDENTIFIER.$AWS_EB_APPLICATION
    • No changes needed
  • AWS_DOCKER_CONFIG=dockerconfig.$ACCOUNT_IDENTIFIER.$AWS_EB_APPLICATION
    • No changes needed
  • secure variable 1: use the Shippable project settings page to encrypt your AWS_ACCESS_KEY_ID
  • secure variable 2: use the Shippable project settings page to encrypt your AWS_SECRET_ACCESS_KEY

micro-api's People

Contributors

ttrahan avatar avinci avatar blaiserideout avatar sdemo 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.