ci: Frontend routing
This commit is contained in:
parent
edccf4ef62
commit
0053279dc3
11 changed files with 248 additions and 960 deletions
35
backend/Dockerfile
Normal file
35
backend/Dockerfile
Normal file
|
@ -0,0 +1,35 @@
|
|||
FROM node:22 AS build-stage
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
|
||||
COPY package*.json ./
|
||||
COPY backend/package.json ./backend/
|
||||
|
||||
RUN npm install --silent
|
||||
|
||||
# Build the backend
|
||||
|
||||
# Root tsconfig.json
|
||||
COPY tsconfig.json ./
|
||||
|
||||
WORKDIR /app/backend
|
||||
|
||||
COPY backend ./
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22 AS production-stage
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package-lock.json backend/package.json ./
|
||||
|
||||
RUN npm install --silent --only=production
|
||||
|
||||
COPY --from=build-stage /app/backend/dist ./dist/
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "--env-file=.env", "dist/app.js"]
|
|
@ -7,7 +7,7 @@
|
|||
"scripts": {
|
||||
"build": "NODE_ENV=production tsc --project tsconfig.json",
|
||||
"dev": "NODE_ENV=development tsx watch --env-file=.env.development.local src/app.ts",
|
||||
"start": "NODE_ENV=production node --env-file=.env.production dist/app.js",
|
||||
"start": "NODE_ENV=production node --env-file=.env dist/app.js",
|
||||
"format": "prettier --write src/",
|
||||
"format-check": "prettier --check src/",
|
||||
"lint": "eslint . --fix",
|
||||
|
@ -18,7 +18,6 @@
|
|||
"@mikro-orm/postgresql": "6.4.6",
|
||||
"@mikro-orm/reflection": "6.4.6",
|
||||
"@mikro-orm/sqlite": "6.4.6",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"axios": "^1.8.1",
|
||||
"dotenv": "^16.4.7",
|
||||
"express": "^5.0.1",
|
||||
|
@ -34,6 +33,7 @@
|
|||
"@types/express": "^5.0.0",
|
||||
"@types/node": "^22.13.4",
|
||||
"@types/response-time": "^2.3.8",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"globals": "^15.15.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsx": "^4.19.3",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue