Fix production build pipeline

This commit is contained in:
Daniel_I_Am 2022-05-26 23:28:38 +02:00
parent fd4ab34247
commit 1ab90c8a84
6 changed files with 20 additions and 14 deletions

View File

@ -1,3 +1,3 @@
docker/
.editorconfig
dist/
README.md
.dockerignore

View File

@ -19,4 +19,3 @@ indent_size = 2
[docker-compose.yml]
indent_size = 4

View File

@ -2,23 +2,21 @@
This is the repository for Daniel's personal website.
## Project setup
```
yarn install
```
Dependencies are read and installed from `package.json` upon application start or build.
### Compiles and hot-reloads for development
```
yarn serve
docker-compose up vue
```
### Compiles and minifies for production
```
yarn build
docker build -t daniel-website/nginx:dev -f docker/nginx/Dockerfile .
```
### Lints and fixes files
```
yarn lint
docker-compose exec vue yarn lint
```
### Customize configuration

View File

@ -0,0 +1,2 @@
Dockerfile
.dockerignore

View File

@ -1,3 +1,14 @@
FROM node:16 as builder
COPY --chown=node ./ /code/
WORKDIR /code
USER node
RUN yarn
RUN yarn build
FROM nginx:1.22.0-alpine
COPY ./etc/nginx/conf.d/ /etc/nginx/conf.d/
COPY ./docker/nginx/etc/nginx/conf.d/ /etc/nginx/conf.d/
COPY --from=builder /code/dist/ /var/www/html/

View File

@ -1,4 +0,0 @@
FROM nginx:1.22.0-alpine
COPY ./etc/nginx/conf.d/ /etc/nginx/conf.d/
COPY ../../build/ /var/www/html/