run production build in container

This commit is contained in:
Gavin McDonald
2025-04-19 17:58:54 -04:00
parent d405ae2d6d
commit 6538013ddd
3 changed files with 6 additions and 3 deletions

View File

@@ -5,11 +5,13 @@ WORKDIR /app
# Copy and install dependencies # Copy and install dependencies
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm ci
# Copy the rest of the app # Copy the rest of the app
COPY . . COPY . .
RUN npm run build
EXPOSE 3000 EXPOSE 3000
CMD ["npm", "run", "dev"] CMD ["npm", "run", "start"]

View File

@@ -46,7 +46,7 @@ export default class GameStore {
positionFront: true, positionFront: true,
prophecy: true, prophecy: true,
notes: true, notes: true,
cardStyle: 'standard', cardStyle: 'color',
}, },
}; };

View File

@@ -6,6 +6,7 @@
"dev": "nodemon", "dev": "nodemon",
"build": "next build && tsc --project tsconfig.server.json", "build": "next build && tsc --project tsconfig.server.json",
"start": "cross-env NODE_ENV=production TS_NODE_BASEURL=./build node -r tsconfig-paths/register build/server.js" "start": "cross-env NODE_ENV=production TS_NODE_BASEURL=./build node -r tsconfig-paths/register build/server.js"
"deploy": "docker buildx build --platform linux/amd64 -t nasty.mcmorgans:5000/tarokka:latest --push ."
}, },
"dependencies": { "dependencies": {
"cross-env": "^7.0.3", "cross-env": "^7.0.3",