Fix production build pipeline
This commit is contained in:
parent
fd4ab34247
commit
1ab90c8a84
@ -1,3 +1,3 @@
|
||||
docker/
|
||||
.editorconfig
|
||||
dist/
|
||||
README.md
|
||||
.dockerignore
|
||||
|
||||
@ -19,4 +19,3 @@ indent_size = 2
|
||||
|
||||
[docker-compose.yml]
|
||||
indent_size = 4
|
||||
|
||||
|
||||
10
README.md
10
README.md
@ -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
|
||||
|
||||
2
docker/nginx/.dockerignore
Normal file
2
docker/nginx/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
@ -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/
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
FROM nginx:1.22.0-alpine
|
||||
|
||||
COPY ./etc/nginx/conf.d/ /etc/nginx/conf.d/
|
||||
COPY ../../build/ /var/www/html/
|
||||
Loading…
Reference in New Issue
Block a user