fixed docker stuff

This commit is contained in:
Win 2024-07-19 11:03:45 +07:00
parent f23a1a334d
commit dd2d2e63f8
2 changed files with 20 additions and 0 deletions

9
Dockerfile Normal file
View File

@ -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" ]

11
docker-compose.yml Normal file
View File

@ -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'