Add things for prod build docker: still not complete

This commit is contained in:
ShootingStar91
2024-03-13 10:06:10 +02:00
parent 00dfd0d9ad
commit 68ef81a71d
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ services:
ports: ports:
- 5173:5173 - 5173:5173
command: > command: >
sh -c "cd /usr/src/app && npm ci && npm run dev -- --host" sh -c "cd /usr/src/app && npm ci && npm run build && npm start -- --host"
now-db-backend: now-db-backend:
container_name: nowdb-backend container_name: nowdb-backend
image: node:20-alpine3.16 image: node:20-alpine3.16
@@ -16,4 +16,4 @@ services:
ports: ports:
- 4000:4000 - 4000:4000
command: > command: >
sh -c "cd /usr/src/app && npm ci && npm run dev" sh -c "cd /usr/src/app && npm ci && npx tsc && npm run start"
+1 -1
View File
@@ -5,7 +5,7 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "tsc && vite build", "build": "npx tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview" "preview": "vite preview"
}, },
+1
View File
@@ -4,6 +4,7 @@
"description": "NOW - New and Old Worlds - Database of fossil mammals", "description": "NOW - New and Old Worlds - Database of fossil mammals",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"start": "docker compose -f docker-compose.yml up",
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"dev": "docker compose -f docker-compose.dev.yml up" "dev": "docker compose -f docker-compose.dev.yml up"
}, },