Skip to content

Commit

Permalink
Implementation of JWT token and TOTP qrcode on POST /machine Close la…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jair de Souza Junior committed Mar 23, 2020
1 parent 1f37d8d commit bdfd693
Show file tree
Hide file tree
Showing 12 changed files with 212 additions and 554 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.vscode
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
FROM node:11-alpine

ENV WITH_TOTP="false"
ENV PRIVATE_KEY="./private.key"
ENV PUBLIC_KEY="./public.key"

# Create app directory
WORKDIR /usr/src/app

COPY package*.json ./
RUN npm ci
RUN npm install

COPY ./src/server.js .
COPY ./src .

EXPOSE 9999

Expand Down
19 changes: 13 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: "3"

networks:
default:
ipam:
driver: default
config:
- subnet: 192.168.1.0/24
# networks:
# default:
# ipam:
# driver: default
# config:
# - subnet: 192.168.1.0/24

volumes:
mongo_data:
Expand Down Expand Up @@ -43,12 +43,19 @@ services:
image: convid/node-accounts-backend
ports:
- "9999:9999"
- "9229:9229"
environment:
URL_MONGODB_SENHA: mongodb://${MONGODB_USUARIO}:${MONGODB_SENHA}@mongodb:27017/db_convid?authMechanism=DEFAULT&authSource=admin
BASE_DOMAIN: localhost:9999
SSH_HOST: localhost
SSH_PORT: 2222
TUNNEL_PORT_RANGE: "3000-60000"
##JWT Confs
ISSUER_NAME: "ConvidDocker"
EXPIRATION_TIME: "1h"
ALGORITHM: "RS512"
##TOTP
WITH_TOTP: "true"

prometheus:
image: flaviostutz/prometheus:latest
Expand Down
Loading

0 comments on commit bdfd693

Please sign in to comment.