diff --git a/docker-compose.yml b/docker-compose.yml index 1498fb862..35c6f1954 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,7 @@ services: image: collinbarrett2/filterlists.web:latest restart: always build: - context: . - dockerfile: web/Dockerfile + context: ./web target: final networks: - reverse-proxy diff --git a/web/.dockerignore b/web/.dockerignore new file mode 100644 index 000000000..348e463fb --- /dev/null +++ b/web/.dockerignore @@ -0,0 +1,2 @@ +**/.gitignore +**/Dockerfile \ No newline at end of file diff --git a/web/Dockerfile b/web/Dockerfile index 0406abc2a..a1d72f845 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,20 +1,20 @@ -# Context: . -# Command: docker build -f src/FilterLists.Web/Dockerfile . +# Context: ./web +# Command: docker build ./web # init base FROM nginx:alpine as base -COPY ./src/FilterLists.Web/nginx/conf.d /etc/nginx/conf.d +COPY nginx/conf.d /etc/nginx/conf.d # init build FROM node:alpine as build # install WORKDIR /usr/src/app/ -COPY src/FilterLists.Web/package*.json ./ +COPY package*.json ./ RUN npm install --only=prod # build -COPY src/FilterLists.Web/. ./ +COPY . ./ RUN INLINE_RUNTIME_CHUNK=false npm run build # final