Add Dockerfile and fix listen address for Docker

This commit is contained in:
Ubuntu
2026-03-01 13:56:49 +00:00
parent a8e52093aa
commit 2aa2a95475
3 changed files with 24 additions and 1 deletions

10
.dockerignore Normal file
View File

@@ -0,0 +1,10 @@
node_modules
server/node_modules
server/kenteken.db
server/kenteken.db-shm
server/kenteken.db-wal
*.zip
src_frontend_orig
Kenteken-Gen-1-main
*.sh
*.nginx

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM node:20-alpine
WORKDIR /app
COPY server/package*.json ./server/
RUN cd server && npm ci --production
COPY server/ ./server/
COPY dist/ ./dist/
EXPOSE 3456
CMD ["node", "server/index.js"]

View File

@@ -117,6 +117,6 @@ app.get('*', (_req, res) => {
res.sendFile(join(distPath, 'index.html')); res.sendFile(join(distPath, 'index.html'));
}); });
app.listen(PORT, '127.0.0.1', () => { app.listen(PORT, '0.0.0.0', () => {
console.log(`Kenteken Gen server draait op poort ${PORT}`); console.log(`Kenteken Gen server draait op poort ${PORT}`);
}); });