Skip to content

Commit

Permalink
Merge pull request #89 from mdenet/20-add-token-server-to-compose
Browse files Browse the repository at this point in the history
Added tokenserver to docker-compose
  • Loading branch information
barnettwilliam authored Oct 13, 2023
2 parents a434889 + 4d7002f commit c17605a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
32 changes: 18 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions tokenserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# syntax=docker/dockerfile:1

FROM node:18.13-alpine

# Create mdenet-ts directory
WORKDIR /usr/src/mdenet-ts

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install
COPY . .

EXPOSE ${TS_PORT}

CMD ["node", "-r", "dotenv/config", "dist/server.js"]

2 changes: 1 addition & 1 deletion tokenserver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"cookie": "^0.5.0",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"octokit": "^2.0.14"
},
"devDependencies": {
"@types/cookie": "^0.5.1",
"dotenv": "^16.0.3",
"ts-loader": "^9.4.2",
"typescript": "^5.0.3"
}
Expand Down
2 changes: 1 addition & 1 deletion tokenserver/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export const config = {

port: process.env.PORT || "10000",
port: process.env.TS_PORT || "10000",

endpointsPrefix: process.env.TS_ENDPOINT_PREFIX || "/mdenet-auth",

Expand Down

0 comments on commit c17605a

Please sign in to comment.