Create Dockerfile
Browse files- Dockerfile +16 -0
Dockerfile
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Node.js image as the base image
|
| 2 |
+
FROM node:20.4
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
RUN --mount=type=secret,id=CLONE,mode=0444,required=true \
|
| 8 |
+
git clone $(cat /run/secrets/CLONE) .
|
| 9 |
+
|
| 10 |
+
RUN chown -R node:node ./* && \
|
| 11 |
+
chmod u+x ./* && \
|
| 12 |
+
chmod -R 777 /app
|
| 13 |
+
RUN npm install
|
| 14 |
+
|
| 15 |
+
# Start the application
|
| 16 |
+
CMD ["node", "server.js", "--disableCsrf"]
|