Skip to content

Commit

Permalink
Merge pull request #1111 from prsm/feature/general-update
Browse files Browse the repository at this point in the history
feature/general update
  • Loading branch information
jonasschultheiss authored Oct 14, 2024
2 parents 1dce3d3 + e47e9f9 commit 3bcd6db
Show file tree
Hide file tree
Showing 38 changed files with 7,134 additions and 6,927 deletions.
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ COPY . .
# ----- BUILD ------
FROM stage-development AS stage-build
RUN yarn install
RUN yarn prisma:generate
RUN yarn build

# ----- PRODUCTION ------
Expand All @@ -26,13 +25,9 @@ FROM stage-base AS stage-production
COPY --from=stage-build /usr/src/app/dist ./dist
COPY --from=stage-build /usr/src/app/yarn.lock ./yarn.lock

RUN npm install --location=global prisma@5.4.2

COPY package.json ./
COPY prisma ./prisma/

RUN yarn install --production
RUN prisma generate

# ----- MAIN ------
FROM stage-${APP_ENV}
Expand Down
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ A Nest rewrite of crystal, the SOS Discord bot.

- [NestJS](https://nestjs.com/)
- [discord-nestjs](https://github.com/fjodor-rybakov/discord-nestjs)
- [Prisma](https://www.prisma.io/)
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)

Expand Down
44 changes: 21 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.9'

services:
# bot:
# container_name: bot
Expand All @@ -12,27 +10,27 @@ services:
# depends_on:
# - bot-database

bot:
restart: unless-stopped
container_name: bot
build:
context: ./
dockerfile: Dockerfile
args:
APP_ENV: ${APP_ENV}
working_dir: /usr/src/app
command: sh -c "yarn install && yarn prisma:generate && yarn start:migrate:dev"
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
env_file:
- ./.env
ports:
- '9229:9229'
links:
- bot-database
depends_on:
- bot-database
# bot:
# restart: unless-stopped
# container_name: bot
# build:
# context: ./
# dockerfile: Dockerfile
# args:
# APP_ENV: ${APP_ENV}
# working_dir: /usr/src/app
# command: sh -c "yarn install && yarn prisma:generate && yarn start:migrate:dev"
# volumes:
# - .:/usr/src/app
# - /usr/src/app/node_modules
# env_file:
# - ./.env
# ports:
# - '9229:9229'
# links:
# - bot-database
# depends_on:
# - bot-database

bot-database:
container_name: bot-database
Expand Down
20 changes: 6 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"keywords": [
"discord",
"nestjs",
"prisma",
"docker",
"docker-compose"
],
Expand All @@ -16,8 +15,8 @@
"url": "https://github.com/prsm/crystal-nest/issues"
},
"engines": {
"node": ">=20.0.0 <21.0.0",
"yarn": "^1.22.19"
"node": ">=22.0.0 <23.0.0",
"pnpm": "^9.12.1"
},
"repository": {
"type": "git",
Expand All @@ -30,19 +29,14 @@
"start:dev": "nest start --debug 0.0.0.0:9229 --watch",
"start:debug": "nest start --debug 0.0.0.0:9229 --watch",
"start:prod": "node dist/main",
"start:migrate:dev": "prisma migrate deploy && yarn start:debug",
"start:migrate:prod": "prisma migrate deploy && yarn start:prod",
"start:heroku": "npx prisma migrate deploy && npm run start:prod",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"doc:generate": "npx compodoc -p tsconfig.json -n 'go! Fleet // Versions Microservice'",
"doc:serve": "yarn doc:generate && npx compodoc -s",
"prisma:generate": "prisma generate",
"prisma:migrate": "prisma migrate dev --name",
"prepare": "husky install",
"doc:serve": "pnpm doc:generate && npx compodoc -s",
"prepare": "husky",
"release": "release-it"
},
"dependencies": {
Expand All @@ -52,7 +46,6 @@
"@nestjs/config": "3.2.3",
"@nestjs/core": "10.4.4",
"@nestjs/platform-express": "10.4.4",
"@prisma/client": "5.17.0",
"bufferutil": "4.0.8",
"class-transformer": "0.5.1",
"class-validator": "0.14.1",
Expand Down Expand Up @@ -82,7 +75,6 @@
"jest": "29.7.0",
"lint-staged": "15.2.10",
"prettier": "3.3.3",
"prisma": "5.17.0",
"source-map-support": "0.5.21",
"supertest": "7.0.0",
"ts-jest": "29.2.5",
Expand All @@ -93,8 +85,8 @@
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": [
"yarn format",
"yarn lint"
"pnpm format",
"pnpm lint"
]
},
"jest": {
Expand Down
Loading

0 comments on commit 3bcd6db

Please sign in to comment.