Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move to jest testing * Move to prettier formatting * Update eslint version * Use husky & lint-staged to run prettier on commit * Update docker build script
- Loading branch information
Showing
19 changed files
with
6,665 additions
and
4,044 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.git | ||
node_modules | ||
coverage | ||
.DS_Store | ||
.nyc_output | ||
logs | ||
*.env |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Editor config - For sharing IDE prefs ~ https://editorconfig.org/ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true |
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root: true | ||
|
||
parserOptions: | ||
sourceType: 'module' | ||
ecmaVersion: 2017 | ||
|
||
env: | ||
node: true | ||
jest: true | ||
|
||
extends: | ||
- standard | ||
- prettier | ||
- prettier/standard |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ node_modules | |
coverage | ||
.DS_Store | ||
.nyc_output | ||
logs | ||
*.env |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tag-version-prefix="" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
semi: false | ||
singleQuote: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
FROM node:8-alpine | ||
|
||
EXPOSE 3000 | ||
|
||
RUN mkdir -p /app | ||
# Use a node alpine image install packages and run the start script | ||
FROM node:10-alpine | ||
WORKDIR /app | ||
|
||
VOLUME /app/logs | ||
|
||
COPY package.json /app | ||
RUN npm install --silent --production | ||
|
||
COPY web /app/web | ||
COPY VERSION /app/VERSION | ||
|
||
CMD node web/index.js | ||
EXPOSE 3000 | ||
COPY ["package.json", "package-lock.json", "/app/"] | ||
ENV NODE_ENV production | ||
RUN npm ci > /dev/null | ||
COPY src /app/src | ||
CMD [ "npm", "start", "-s" ] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
|
||
# Docker Status Api | ||
|
||
> An api for running docker containers and some whitelisted environment variables | ||
> | ||
> 30 Sept 2017 - Rob Anderson | ||
## Features | ||
|
||
- Get which containers are running in docker | ||
- See what ports are exposed | ||
- Pluck environment variables from the containers | ||
- Requires the docker socket is volume mapped in e.g. `-v /var/run/docker.sock:/var/run/docker.sock` | ||
|
||
|
||
## Optional Variables | ||
| Variable | Purpose | | ||
| --------------- | ------- | | ||
| `ENV_KEYS` | The environment variables you want to expose (comma seperated) e.g. `HAS_PINEAPPLE,IS_ROCKET` | | ||
| `APP_PORT` | The port you want the api to run on (default: `3000`) | | ||
| `DOCKER_SOCKET` | Where the docker socket is mounted in (default: `/var/run/docker.sock`) | | ||
|
||
| Variable | Purpose | | ||
| ---------- | --------------------------------------------------------------------------------------------- | | ||
| `ENV_KEYS` | The environment variables you want to expose (comma seperated) e.g. `HAS_PINEAPPLE,IS_ROCKET` | |
Oops, something went wrong.