mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
simplify web docker build context
This commit is contained in:
parent
70432e535d
commit
a6d74ec8cf
3 changed files with 8 additions and 7 deletions
|
|
@ -16,8 +16,7 @@ services:
|
|||
image: collinbarrett2/filterlists.web:latest
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
dockerfile: web/Dockerfile
|
||||
context: ./web
|
||||
target: final
|
||||
networks:
|
||||
- reverse-proxy
|
||||
|
|
|
|||
2
web/.dockerignore
Normal file
2
web/.dockerignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
**/.gitignore
|
||||
**/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
|
||||
|
|
|
|||
Loading…
Reference in a new issue