Skip to content

Commit f6fec13

Browse files
committed
Fix problem with booting server from Docker image
1 parent 7f30ee2 commit f6fec13

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ COPY . .
1212
# INSTBYTE_DATA and INSTBYTE_UPLOADS are picked up by db.js and server.js
1313
ENV INSTBYTE_DATA=/data
1414
ENV INSTBYTE_UPLOADS=/data/uploads
15+
ENV INSTBYTE_BOOT=1
1516

1617
# Create the data dir inside image as fallback
1718
RUN mkdir -p /data/uploads
@@ -22,4 +23,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
2223
EXPOSE 3000
2324

2425
# Run the server directly — not via instbyte.js (that's the npx bin)
25-
CMD ["npm", "start"]
26+
CMD ["npm", "run", "server"]

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"start": "node bin/instbyte.js",
1616
"dev": "nodemon bin/instbyte.js",
1717
"test": "vitest run",
18-
"test:watch": "vitest"
18+
"test:watch": "vitest",
19+
"server": "node server/server.js"
1920
},
2021
"keywords": [
2122
"lan",
@@ -52,4 +53,4 @@
5253
"supertest": "^7.2.2",
5354
"vitest": "^2.1.8"
5455
}
55-
}
56+
}

0 commit comments

Comments
 (0)