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'