docker
This commit is contained in:
parent
a77fe19ebc
commit
2fd696ad2a
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
build
|
||||
.dockerignore
|
||||
Dockerfile
|
||||
Dockerfile.prod
|
20
Dockerfile
Normal file
20
Dockerfile
Normal 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
16
docker-compose.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user