This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM risingstack/alpine:3.4-v6.9.4-4.2.0 | |
| ARG APP_VERSION=local | |
| ENV PORT 3001 | |
| ENV APP_VERSION ${APP_VERSION} | |
| EXPOSE 3001 | |
| COPY package.json package.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| language: node_js | |
| env: | |
| - TRAVIS_DEPLOY_ENV=staging | |
| APP_VERSION=v$TRAVIS_BUILD_NUMBER | |
| services: | |
| - docker | |
| node_js: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| before_deploy: | |
| - wget https://releases.hashicorp.com/terraform/0.11.5/terraform_0.11.5_linux_amd64.zip -O /tmp/terraform.zip | |
| - sudo unzip -d /usr/local/bin/ /tmp/terraform.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| provider "aws" { | |
| region = "${var.aws_region}" | |
| max_retries = 21 | |
| } | |
| terraform { | |
| backend "s3" { | |
| key = "terraform.tfstate" # This is overriden by the backend-config flag when calling deploy.sh | |
| region = "us-east-1" # Todo - i'm not sure where this can come through as a variable | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -ex | |
| BUILD_NUMBER=${TRAVIS_BUILD_NUMBER:-45} | |
| DEPLOY_ENV=${TRAVIS_DEPLOY_ENV:-staging} | |
| echo "Starting deployment using terraform, build number: $BUILD_NUMBER, environment: $DEPLOY_ENV" | |
| cd ./ops/terraform |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| deploy: | |
| - provider: script | |
| skip_cleanup: true | |
| script: chmod +x ./deploy.sh && ./deploy.sh | |
| on: | |
| branch: master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| cluster="cluster-name" | |
| x="aws ecs wait services-stable --cluster $cluster --services $cluster" | |
| echo "Waiting until ecs services report as healthy" | |
| for i in 1 2 3 4 5; do (eval $x) && break || sleep 5; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function* request(apiCall) { | |
| const response = yield apiCall | |
| if (response.status === 401) { | |
| yield put(SessionActions.logout()) | |
| return null | |
| } | |
| return response | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PageBrowser() implements AutoCloseable { | |
| final SeleniumDriver mDriver; | |
| public PageBrowser() { | |
| mDriver = new SeleniumDriver(); // setup the rest of the driver | |
| } | |
| TPage <TPage> goTo() { | |
| // Todo Java Reflection on TPage and inject SeleniumDriver | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -d --name my_postgres -v my_dbdata:/var/lib/postgresql/data -p 54320:5432 postgres:11 |