Browse Source

update

master
Yutsuo 6 years ago
parent
commit
858c047f7a
  1. 24
      .dockerignore
  2. 16
      Dockerfile
  3. 10
      docker-compose.debug.yml
  4. 31
      docker-compose.proxy.yml
  5. 31
      docker-compose.yml

24
.dockerignore

@ -0,0 +1,24 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
README.md

16
Dockerfile

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

10
docker-compose.debug.yml

@ -0,0 +1,10 @@
version: '2.1'
services:
mern-todo-app:
image: mern-todo-app
build:
context: .
dockerfile: Dockerfile
ports:
- 3002:3002

31
docker-compose.proxy.yml

@ -0,0 +1,31 @@
version: "3.7"
services:
react:
image: yutsuo/mern-todo-app
container_name: mern-todo-app
build:
context: .
args:
- HTTP_PROXY=http://192.168.128.1:3128
- HTTPS_PROXY=http://192.168.128.1:3128
- http_proxy=http://192.168.128.1:3128
- https_proxy=http://192.168.128.1:3128
ports:
- "3000:3000"
volumes:
- .:/app
- /app/node_modules
environment:
- PORT=3000
- HTTP_PROXY=http://192.168.128.1:3128
- HTTPS_PROXY=http://192.168.128.1:3128
- http_proxy=http://192.168.128.1:3128
- https_proxy=http://192.168.128.1:3128
- NODE_ENV=development
networks:
default:
ipam:
driver: default
config:
- subnet: 172.17.0.0/24

31
docker-compose.yml

@ -0,0 +1,31 @@
version: "3.7"
services:
react:
image: yutsuo/mern-todo-app
container_name: mern-todo-app
build:
context: .
args:
- HTTP_PROXY=http://192.168.128.1:3128
- HTTPS_PROXY=http://192.168.128.1:3128
- http_proxy=http://192.168.128.1:3128
- https_proxy=http://192.168.128.1:3128
ports:
- "3000:3000"
volumes:
- .:/app
- /app/node_modules
environment:
- PORT=3000
- HTTP_PROXY=http://192.168.128.1:3128
- HTTPS_PROXY=http://192.168.128.1:3128
- http_proxy=http://192.168.128.1:3128
- https_proxy=http://192.168.128.1:3128
- NODE_ENV=development
networks:
default:
ipam:
driver: default
config:
- subnet: 172.17.0.0/24
Loading…
Cancel
Save