Skip to content

Commit

Permalink
⬆️ Upgrade dependancies
Browse files Browse the repository at this point in the history
* 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
robb-j committed Jan 3, 2019
1 parent 4cd2a51 commit 3139e6a
Show file tree
Hide file tree
Showing 19 changed files with 6,665 additions and 4,044 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
@@ -1,5 +1,6 @@
.git
node_modules
coverage
.DS_Store
.nyc_output
logs
*.env
9 changes: 9 additions & 0 deletions .editorconfig
@@ -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 added .env.example
Empty file.
39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

14 changes: 14 additions & 0 deletions .eslintrc.yml
@@ -0,0 +1,14 @@
root: true

parserOptions:
sourceType: 'module'
ecmaVersion: 2017

env:
node: true
jest: true

extends:
- standard
- prettier
- prettier/standard
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -2,4 +2,4 @@ node_modules
coverage
.DS_Store
.nyc_output
logs
*.env
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
tag-version-prefix=""
2 changes: 2 additions & 0 deletions .prettier.yml
@@ -0,0 +1,2 @@
semi: false
singleQuote: true
23 changes: 8 additions & 15 deletions Dockerfile
@@ -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" ]
13 changes: 6 additions & 7 deletions README.md
@@ -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` |
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

0 comments on commit 3139e6a

Please sign in to comment.