Fix production build pipeline
This commit is contained in:
parent
fd4ab34247
commit
1ab90c8a84
@ -1,3 +1,3 @@
|
|||||||
docker/
|
dist/
|
||||||
.editorconfig
|
|
||||||
README.md
|
README.md
|
||||||
|
.dockerignore
|
||||||
|
|||||||
@ -19,4 +19,3 @@ indent_size = 2
|
|||||||
|
|
||||||
[docker-compose.yml]
|
[docker-compose.yml]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
|||||||
10
README.md
10
README.md
@ -2,23 +2,21 @@
|
|||||||
This is the repository for Daniel's personal website.
|
This is the repository for Daniel's personal website.
|
||||||
|
|
||||||
## Project setup
|
## Project setup
|
||||||
```
|
Dependencies are read and installed from `package.json` upon application start or build.
|
||||||
yarn install
|
|
||||||
```
|
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
### Compiles and hot-reloads for development
|
||||||
```
|
```
|
||||||
yarn serve
|
docker-compose up vue
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and minifies for production
|
### Compiles and minifies for production
|
||||||
```
|
```
|
||||||
yarn build
|
docker build -t daniel-website/nginx:dev -f docker/nginx/Dockerfile .
|
||||||
```
|
```
|
||||||
|
|
||||||
### Lints and fixes files
|
### Lints and fixes files
|
||||||
```
|
```
|
||||||
yarn lint
|
docker-compose exec vue yarn lint
|
||||||
```
|
```
|
||||||
|
|
||||||
### Customize configuration
|
### 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
|
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