Skip to content

Commit

Permalink
Merge pull request #31 from RHoKAustralia/git-30_run_app_locally
Browse files Browse the repository at this point in the history
#30 - run app locally - initial issue testing was an error on my part, I was missing the .env.local file.
  • Loading branch information
darrenjl authored Sep 29, 2018
2 parents 42dac81 + 87618b8 commit cc19cc8
Show file tree
Hide file tree
Showing 72 changed files with 2,204 additions and 660 deletions.
40 changes: 33 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 2
jobs:
ui-build:
docker:
- image: circleci/node:7.10
- image: circleci/node:8.10

working_directory: ~/carpal/frontend

Expand Down Expand Up @@ -49,10 +49,13 @@ jobs:
- run:
name: Deploy to S3
command: aws s3 sync /tmp/build/ s3://carpal-ui-rides-dev/ --delete
services-deploy:
services-build:
docker:
- image: circleci/node:7.10
working_directory: ~/carpal/infrastructure/services
- image: circleci/node:8.10
- image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: admin
working_directory: ~/carpal/backend
steps:
- checkout:
path: ~/carpal
Expand All @@ -61,17 +64,40 @@ jobs:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install dockerize
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
environment:
DOCKERIZE_VERSION: v0.6.1
- run:
name: Wait for db
command: dockerize -wait tcp://localhost:3306 -timeout 1m
- run: npm install
- run: npm run refresh-db
- run: npm test
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
services-deploy:
docker:
- image: circleci/node:8.10
working_directory: ~/carpal/backend
steps:
- checkout:
path: ~/carpal
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: ./writeSecrets.sh
- run: npm run deploy-sls
- run: npm run deploy-sls
workflows:
version: 2
ui-build-deploy:
application-build-deploy:
jobs:
- services-build
- ui-build
- ui-deploy:
requires:
Expand All @@ -82,4 +108,4 @@ workflows:
- services-deploy:
filters:
branches:
only: master
only: master
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# hills-carpal

[![CircleCI](https://circleci.com/gh/RHoKAustralia/hills-carpal.svg?style=svg)](https://circleci.com/gh/RHoKAustralia/hills-carpal)

# Frontend



File renamed without changes.
Loading

0 comments on commit cc19cc8

Please sign in to comment.