From dd2d2e63f8c8a5cda903f56756c253b30b8fac68 Mon Sep 17 00:00:00 2001 From: Win Date: Fri, 19 Jul 2024 11:03:45 +0700 Subject: [PATCH] fixed docker stuff --- Dockerfile | 9 +++++++++ docker-compose.yml | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..879eb15 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM node:20-alpine +RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app +WORKDIR /home/node/app +COPY package*.json ./ +USER node +RUN npm install +COPY --chown=node:node . . +EXPOSE 3000 +CMD [ "node", "index.js" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1959acf --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' +services: + photospherestudio: + build: . + container_name: photospherestudio + hostname: photospherestudio + ports: + - '3000:3000' + volumes: + - ./config.json:/home/node/app/config.json + restart: 'on-failure'