From 6280c02e0dbea44fe187d39428109575d5d9d6f1 Mon Sep 17 00:00:00 2001 From: Daniel Wildsmith Date: Wed, 9 Oct 2024 12:34:37 -0400 Subject: [PATCH] feat: Dockerfile for gh-organization stats --- gh-organization-stats/Dockerfile | 15 +++++++++++++++ gh-organization-stats/README.md | 2 +- gh-organization-stats/package.json | 9 ++++----- 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 gh-organization-stats/Dockerfile diff --git a/gh-organization-stats/Dockerfile b/gh-organization-stats/Dockerfile new file mode 100644 index 0000000..b2ff471 --- /dev/null +++ b/gh-organization-stats/Dockerfile @@ -0,0 +1,15 @@ +FROM node:18-alpine + +WORKDIR /app + +COPY package*.json ./ + +RUN npm install + +COPY . . + +RUN npm run build + +EXPOSE 8000 + +CMD ["npm", "start"] diff --git a/gh-organization-stats/README.md b/gh-organization-stats/README.md index a450ed1..ee5d5b2 100644 --- a/gh-organization-stats/README.md +++ b/gh-organization-stats/README.md @@ -15,7 +15,7 @@ npm install ## Usage Starting the development server: ``` -npm run develop +npm run dev ``` You may access the server at http://localhost:8000 diff --git a/gh-organization-stats/package.json b/gh-organization-stats/package.json index 37d3e31..59c7ff0 100644 --- a/gh-organization-stats/package.json +++ b/gh-organization-stats/package.json @@ -1,15 +1,14 @@ { "name": "semester-stats", "version": "1.0.0", - "description": "Developed for a statistics page on the club website", - "main": "index.js", + "description": "A simple API to get the stats for all the repositories in an organization in a single request, caching the data in a MongoDB database", + "main": "dist/index.js", "scripts": { + "build": "tsc", + "start": "node dist/index.js", "dev": "npx ts-node-dev src/index.ts", "test": "echo \"Error: no test specified\" && exit 1" }, - "keywords": [], - "author": "", - "license": "ISC", "dependencies": { "@types/express": "^4.17.21", "@types/node": "^22.5.5",