diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..201d751 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules +npm-debug.log +build +.git +*.md +.gitignore diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bdeb76a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM node:18 + +# Create app directory +WORKDIR /usr/src/app + +# Install app dependencies +# A wildcard is used to ensure both package.json AND package-lock.json are copied +# where available (npm@5+) +COPY package*.json ./ + +RUN npm install +# If you are building your code for production +# RUN npm ci --omit=dev + +# Bundle app source +COPY . . + +ENV NODE_OPTIONS=--openssl-legacy-provider + +EXPOSE 3000 +CMD [ "node", "server.js" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c03d1cd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3' +services: + app: + build: . + container_name: spyfall + ports: + - "8098:3000" \ No newline at end of file