Skip to content

Commit

Permalink
Lift and shift.
Browse files Browse the repository at this point in the history
  • Loading branch information
samiwel committed Nov 12, 2018
1 parent 8a9ec85 commit b7c84f9
Show file tree
Hide file tree
Showing 1,299 changed files with 108,173 additions and 0 deletions.
1 change: 1 addition & 0 deletions eq-author-api/.cfignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
9 changes: 9 additions & 0 deletions eq-author-api/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
status:
project:
default:
target: auto
threshold: null
base: auto

comment: off
4 changes: 4 additions & 0 deletions eq-author-api/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git
Dockerfile
docker-compose.yml
node_modules/
1 change: 1 addition & 0 deletions eq-author-api/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage/
11 changes: 11 additions & 0 deletions eq-author-api/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["eslint-config-eq-author"],
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "script"
}
}
9 changes: 9 additions & 0 deletions eq-author-api/.github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Expected behaviour

### Actual behaviour

### Steps to reproduce the behaviour

### Technical information

### Screenshot
5 changes: 5 additions & 0 deletions eq-author-api/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### What is the context of this PR?
Describe what you have changed and why, link to other PRs or Issues as appropriate.

### How to review
Describe the steps required to test the changes (include screenshots if appropriate).
69 changes: 69 additions & 0 deletions eq-author-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

# Created by https://www.gitignore.io/api/node

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


# End of https://www.gitignore.io/api/node

node_modules/

.vscode
1 change: 1 addition & 0 deletions eq-author-api/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
1 change: 1 addition & 0 deletions eq-author-api/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
30 changes: 30 additions & 0 deletions eq-author-api/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
language: node_js
node_js:
- "10"


install:
- yarn install --frozen-lockfile
- yarn add codecov
cache:
yarn: true
directories:
- "node_modules"

script:
- yarn lint -- --max-warnings=0
- yarn test
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- export TAG=`if [ "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]; then echo "latest"; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi`
- export TAG=${TAG//\//-}
- docker build -t onsdigital/eq-author-api:$TAG --build-arg APPLICATION_VERSION=$(git rev-parse HEAD) -f Dockerfile .
- echo "Pushing with tag [$TAG]"
- docker push onsdigital/eq-author-api:$TAG

after_success:
- codecov

branches:
only:
- master
- /^greenkeeper/.*$/
24 changes: 24 additions & 0 deletions eq-author-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:10-alpine

RUN apk add --no-cache python3 && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
if [ ! -e /usr/bin/python ]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
rm -r /root/.cache && \
pip install --upgrade awscli==1.16.27

EXPOSE 4000
ENV PORT=4000
WORKDIR /app

ARG APPLICATION_VERSION
ENV EQ_AUTHOR_API_VERSION $APPLICATION_VERSION
ENV AWS_DEFAULT_REGION eu-west-1
ENV NODE_ENV production

ENTRYPOINT ["./docker-entrypoint.sh"]

COPY . /app
RUN yarn install
Loading

0 comments on commit b7c84f9

Please sign in to comment.