feat(deployment): docker file for vitesse (#378)
This commit is contained in:
parent
d6f8290938
commit
4d6d9b9d2f
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM node:16-alpine
|
||||||
|
RUN corepack enable
|
||||||
|
WORKDIR /root/app
|
||||||
|
COPY . .
|
||||||
|
RUN pnpm i --prod
|
||||||
|
RUN pnpm build
|
||||||
|
CMD pnpm preview --host
|
10
README.md
10
README.md
@ -191,6 +191,16 @@ And you will see the generated file in `dist` that ready to be served.
|
|||||||
|
|
||||||
Go to [Netlify](https://app.netlify.com/start) and select your clone, `OK` along the way, and your App will be live in a minute.
|
Go to [Netlify](https://app.netlify.com/start) and select your clone, `OK` along the way, and your App will be live in a minute.
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
First, build the vitesse image by opening the terminal in the project's root directory.
|
||||||
|
```bash
|
||||||
|
docker build . -t vitesse
|
||||||
|
```
|
||||||
|
Run the image and specify port mapping with the `-p` flag.
|
||||||
|
```bash
|
||||||
|
docker run -p 4173:4173 vitesse
|
||||||
|
```
|
||||||
|
|
||||||
## Why
|
## Why
|
||||||
|
|
||||||
I have created several Vite apps recently. Setting the configs up is kinda the bottleneck for me to make the ideas simply come true within a very short time.
|
I have created several Vite apps recently. Setting the configs up is kinda the bottleneck for me to make the ideas simply come true within a very short time.
|
||||||
|
Loading…
Reference in New Issue
Block a user