forked from kompetenzinventar/ki-frontend
add Dockerfile
This commit is contained in:
parent
ffc335f935
commit
69d823504a
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.git
|
||||||
|
node_modules
|
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM node:14-alpine as builder
|
||||||
|
|
||||||
|
COPY . ./
|
||||||
|
|
||||||
|
RUN npm ci && npm run build
|
||||||
|
|
||||||
|
|
||||||
|
FROM nginx
|
||||||
|
|
||||||
|
COPY --from=builder /dist/ /usr/share/nginx/html/
|
22
README.md
22
README.md
@ -4,7 +4,7 @@
|
|||||||
Vue3 Projekt:
|
Vue3 Projekt:
|
||||||
## Project setup
|
## Project setup
|
||||||
```
|
```
|
||||||
npm install
|
npm ci
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
### Compiles and hot-reloads for development
|
||||||
@ -29,3 +29,23 @@ Vorraussetzung: Node & NPM
|
|||||||
|
|
||||||
### Enviroment Variable
|
### Enviroment Variable
|
||||||
VUE_APP_API_URL ist die Enviroment Variable mit der die Adresse der API übergeben wird
|
VUE_APP_API_URL ist die Enviroment Variable mit der die Adresse der API übergeben wird
|
||||||
|
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
### Image bauen
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build --tag ki_frontend .
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Container starten
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run \
|
||||||
|
--name=ki_frontend \
|
||||||
|
-e VUE_APP_API_URL=http://localhost:5000 \
|
||||||
|
-p 8000:80 \
|
||||||
|
ki_frontend
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user