Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- 6379:6379
options: --name redis-test
steps:
- name: Use Node.js 8.x
- name: Use Node.js 20.x
uses: actions/setup-node@v2
with:
node-version: '8.x'
node-version: '20.10.0'
- name: Checkout Repository
uses: actions/checkout@v2

Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.10.0
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.10.0
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"makefile.extensionOutputFolder": "./.vscode"
}
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM mhart/alpine-node:8.15.1
RUN apk add --no-cache make gcc g++ python
FROM node:20.9.0-alpine
RUN apk add --no-cache make gcc g++ python3
WORKDIR /application/functions
ADD lib lib
ADD package.json .
ADD npm-shrinkwrap.json .

ADD . .
RUN npm install
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ help:
@echo ' lint ..................... runs code linter'

setup: install_node
npm install
npm install --legacy-peer-deps

run:
npm run start_dev
Expand Down
20 changes: 11 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
version: '3'
services:
web:
container_name: functions_app
image: globocom/functions
# image: globocom/functions
build: .
ports:
- "8100:8100"
networks:
- functions_net
# networks:
# - functions_net
depends_on:
- redis
command: node lib/app.js
command: node /application/functions/lib/app.js
volumes:
- .:/application/functions
- node_vol:/application/functions/node_modules
environment:
REDIS_ENDPOINT: redis://redis:6379/0
redis:
container_name: functions_db
ports:
- "6379:6379"
image: redis
volumes:
- redis_vol:/data
networks:
- functions_net
# networks:
# - functions_net

volumes:
redis_vol:
node_vol:

networks:
functions_net:
# networks:
# functions_net:
2 changes: 1 addition & 1 deletion lib/domain/storage/InMemory.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { v4: uuidV4 } = require('uuid');
const Storage = require('../storage');
const uuidV4 = require('uuid/v4');
const Paginator = require('../paginator');

const ERR_FUNCTION_NOT_FOUND = new Error('Function not found');
Expand Down
2 changes: 1 addition & 1 deletion lib/domain/storage/redis.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { v4: uuidV4 } = require('uuid');
const Redis = require('ioredis');
const uuidV4 = require('uuid/v4');
const cluster = require('cluster');
const log = require('../../support/log');
const config = require('../../support/config');
Expand Down
Loading
Loading