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
20 changes: 0 additions & 20 deletions .circleci/config.yml

This file was deleted.

18 changes: 14 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
.DS_Store

.gitignore
.git

node_modules
build
dist

.prettierrc
.nvmrc

.env.sample
.gitignore
.env.local

README.md

.notes
build
dist
.env
34 changes: 34 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run Tests

on: [push]

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:16.4

env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.17.0'

- name: Install dependencies
run: npm install
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
.notes
.DS_Store

.vscode

node_modules
build
dist
.env
.DS_Store

.env.local

.notes
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17.0
5 changes: 2 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
"singleQuote": false,
"trailingComma": "es5"
}
53 changes: 24 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,47 +1,42 @@
FROM node:18-alpine AS base

FROM node:10.15.0-alpine as base
WORKDIR /app

# installing dependencies
ENV NEXT_TELEMETRY_DISABLED=1
ENV APP_NAME=openkey
ENV PORT=3000

# install dependencies
FROM base AS dependencies
COPY ./package.json .
COPY ./package-lock.json .
COPY package.json package-lock.json ./
RUN npm set progress=false
RUN npm install --production
RUN npm install --omit=dev
RUN cp -R node_modules prod_node_modules
RUN npm install

# building the backend
FROM base AS backend
# build app
FROM base AS build
COPY --from=dependencies /app/node_modules /app/node_modules
COPY ./backend ./backend
COPY ./tsconfig.json .
COPY ./package.json .
RUN npm run server:build
COPY . /app
RUN npm run build

# building frontend
FROM base AS frontend
# development release
FROM base AS development
COPY . .
COPY --from=dependencies /app/node_modules /app/node_modules
COPY ./webpack.config.js .
COPY ./public ./public
COPY ./package.json .
RUN npm run frontend:build

ARG COMMIT_SHA
ENV COMMIT_SHA $COMMIT_SHA

ENV BUNDLE dist
EXPOSE 3000

ENV IS_DOCKER_CONTAINER true
CMD ["npm", "run", "dev"]

# copying any resoruces needed
# production release
FROM base AS production
COPY --from=dependencies /app/prod_node_modules /app/node_modules
COPY --from=dependencies /app/package.json /app/package.json
COPY --from=backend /app/build /app/build
COPY --from=frontend /app/dist /app/dist
COPY ./swagger.yaml /app/swagger.yaml
COPY --from=build /app/next.config.js /app/next.config.js
COPY --from=build /app/build /app/build

# exposing the container port
EXPOSE 8000
EXPOSE 3000

CMD ["npm", "run", "start"]
# Running the app
CMD ["npm", "run", "start"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Here is the [change log](https://github.com/andreGarvin/openkey/blob/3.0.0/CHANG

You need these three things to ensure compatibility when working locally.

- NodeJS version 10.15.0
- PostgreSQL version 12.13
- Docker version 19.03.5
- NodeJS version 18.17.0
- PostgreSQL version 16.4
- Docker version 27.1.1

## Getting Started

Expand Down
18 changes: 0 additions & 18 deletions backend/common/db.ts

This file was deleted.

55 changes: 0 additions & 55 deletions backend/index.ts

This file was deleted.

36 changes: 0 additions & 36 deletions backend/middleware/error-handler.ts

This file was deleted.

25 changes: 0 additions & 25 deletions backend/middleware/validate-request-body.ts

This file was deleted.

11 changes: 0 additions & 11 deletions backend/routes/feedback/interfaces.ts

This file was deleted.

28 changes: 0 additions & 28 deletions backend/routes/feedback/routes.ts

This file was deleted.

14 changes: 0 additions & 14 deletions backend/routes/feedback/schemas.ts

This file was deleted.

Loading