This commit is contained in:
mattyl006 2022-10-21 11:17:05 +02:00
parent a77fe19ebc
commit 2fd696ad2a
3 changed files with 41 additions and 0 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
node_modules
build
.dockerignore
Dockerfile
Dockerfile.prod

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
# pull official base image
FROM node:13.12.0-alpine
# set working directory
WORKDIR /app
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# install app dependencies
COPY package.json ./
COPY package-lock.json ./
RUN npm install --silent
RUN npm install react-scripts@3.4.1 -g --silent
# add app
COPY . ./
# start app
CMD ["npm", "start"]

16
docker-compose.yml Normal file
View File

@ -0,0 +1,16 @@
version: '3.7'
services:
sample:
container_name: gonito
build:
context: .
dockerfile: Dockerfile
# volumes:
# - '.:/app'
# - '/app/node_modules'
ports:
- 3001:3000
environment:
- CHOKIDAR_USEPOLLING=true