Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
chore: up code
Browse files Browse the repository at this point in the history
  • Loading branch information
tangimds committed Mar 1, 2023
1 parent 2eaaabe commit 220411a
Show file tree
Hide file tree
Showing 332 changed files with 38,118 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions api/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PORT=
ENVIRONMENT=development
SENTRY_KEY=
APP_URL=
APP_NAME=
VERSION=
DATABASE_URL=
CRONJOBS_ENABLED=false
6 changes: 6 additions & 0 deletions api/.env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PORT=
ENVIRONMENT=staging
SENTRY_KEY=
APP_URL=
APP_NAME=
VERSION=
3 changes: 3 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
.env.production
node_modules
1 change: 1 addition & 0 deletions api/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict = true
19 changes: 19 additions & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:16-alpine3.16

ARG PRODUCTION

WORKDIR /app

RUN chown node:node /app

COPY . .

RUN if [ -z "$PRODUCTION" ]; then echo "Copy staging values"; cp .env.staging .env; else cp .env.production .env; fi

RUN yarn --production --frozen-lockfile

USER 1000

ENV NODE_ENV=production

ENTRYPOINT ["yarn", "start"]
48 changes: 48 additions & 0 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "api_bpco",
"version": "0.1.0",
"mobileAppVersion": "1.0.0",
"mobileAppBuildNumber": 1,
"mobileAppAndroidBuildNumber": 1,
"mobileAppIosBuildNumber": 1,
"description": "",
"main": "index.js",
"scripts": {
"dev": "cross-env NODE_ENV=development nodemon ./src/index.js",
"start": "NODE_ENV=production npx prisma migrate deploy && NODE_ENV=production node ./src/index.js",
"start:test": "NODE_ENV=test node ./src/index.js",
"initdb": "node ./src/db/scriptInit.js"
},
"author": "",
"license": "Apache-2.0",
"prettier": {
"printWidth": 150
},
"dependencies": {
"@prisma/client": "^4.4.0",
"@sentry/node": "^6.19.6",
"@sentry/tracing": "^6.17.6",
"@slack/webhook": "^6.1.0",
"bcryptjs": "^2.4.3",
"cors": "^2.8.5",
"date-fns": "^2.29.3",
"date-fns-tz": "^1.3.7",
"dotenv": "^16.0.0",
"express": "^4.17.1",
"helmet": "^4.0.0",
"morgan": "^1.10.0",
"node-cron": "^3.0.2",
"node-fetch": "2",
"node-pushnotifications": "^2.0.3"
},
"devDependencies": {
"cross-env": "^7.0.3",
"nodemon": "^2.0.15",
"prisma": "^4.4.0"
},
"engines": {
"npm": "please-use-yarn",
"yarn": "< 2",
"node": ">= 14"
}
}
Loading

0 comments on commit 220411a

Please sign in to comment.