Skip to content

Commit

Permalink
moved js code into 'src' directory
Browse files Browse the repository at this point in the history
  • Loading branch information
pan261 committed Nov 30, 2021
1 parent f5e309d commit 5d6089b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 8 deletions.
10 changes: 6 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ version: "3.8"
services:
auth_server:
build:
context: .
context: ./src
dockerfile: Dockerfile
env_file: ./.env
volumes:
- .:/ffs/
- ./src:/ffs/
- /ffs/node_modules
ports:
- "3000:3000"
command: "node server.js"

task_runner_1:
build:
context: .
context: ./src
dockerfile: Dockerfile
env_file: ./.env
volumes:
- .:/ffs/
- ./src:/ffs/
- /ffs/node_modules
network_mode: host
command: "node taskRunner.js lathe"
4 changes: 2 additions & 2 deletions Dockerfile → src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:16
WORKDIR /ffs/
COPY package.json .
COPY package.json ./
RUN npm install
COPY . .
COPY . ./
5 changes: 4 additions & 1 deletion config.js → src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
* Configures constants used in the other parts of this app
*/

require('dotenv').config();
const dotenv = require('dotenv');

dotenv.config({path: '../.env'});

const ForgeAuthClient = require('forge-apis').AuthClientThreeLegged;

const scopes = ['bucket:create', 'bucket:read', 'data:read', 'data:create', 'data:write'];
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion server.js → src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const createServer = () => {
* Used internally to refresh tokens automatically
*/
const refresh = () => {
config.authClient.refreshToken(credentials, scopes)
config.authClient.refreshToken(credentials, config.scopes)
.then(creds => {
credentials = creds;
console.log(
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 5d6089b

Please sign in to comment.