build: 🔨 dev on web outside of docker

This commit is contained in:
Collin M. Barrett 2020-08-29 14:46:19 -05:00
parent d64f9acab8
commit 2bfaadf6f7
6 changed files with 13 additions and 47 deletions

View file

@ -10,15 +10,6 @@ services:
- ./reverse-proxy/conf.d.dev:/etc/nginx/conf.d:ro
command: ["nginx-debug", "-g", "daemon off;"]
web:
build:
dockerfile: Dockerfile.dev
volumes:
- ./web/src:/app/src:ro
environment:
- CHOKIDAR_USEPOLLING=true
stdin_open: true
directory.api:
build:
dockerfile: directory/src/FilterLists.Directory.Api/Dockerfile.dev

View file

@ -6,6 +6,18 @@ services:
reverse_proxy:
ports:
- "443:443"
depends_on:
- web
volumes:
- ./reverse-proxy/conf.d:/etc/nginx/conf.d:ro
- ~/cert:/etc/nginx/cert:ro
web:
image: ${DOCKER_REGISTRY-}filterlists_web
restart: always
build:
context: ./web
networks:
- reverse_proxy
depends_on:
- directory.api

View file

@ -7,21 +7,10 @@ services:
networks:
- reverse_proxy
depends_on:
- web
- directory.api
volumes:
- ./reverse-proxy/svr-includes:/etc/nginx/svr-includes:ro
web:
image: ${DOCKER_REGISTRY-}filterlists_web
restart: always
build:
context: ./web
networks:
- reverse_proxy
depends_on:
- directory.api
directory.api:
image: ${DOCKER_REGISTRY-}filterlists_directory_api
restart: always

View file

@ -12,15 +12,4 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
proxy_pass http://web:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

View file

@ -1,15 +0,0 @@
# init
FROM node:alpine
ENV PATH /app/node_modules/.bin:$PATH
EXPOSE 3000
# install
WORKDIR /app
COPY public/. public/
COPY config-overrides.js ./
COPY tsconfig.json ./
COPY package*.json ./
RUN npm i
# start
CMD ["npm", "start"]

View file

@ -28,7 +28,7 @@
"test": "react-app-rewired test",
"eject": "react-scripts eject"
},
"proxy": "https://filterlists.com",
"proxy": "http://localhost:80",
"eslintConfig": {
"extends": [
"react-app",