Compare commits

...

2 Commits

Author SHA1 Message Date
8dd67c53e7 Merge pull request 'Docker' (#1) from docker into main
Reviewed-on: #1
2021-06-26 12:37:07 +02:00
69d823504a
add Dockerfile 2021-06-14 22:27:23 +02:00
3 changed files with 34 additions and 2 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
.git
node_modules

10
Dockerfile Normal file
View 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/

View File

@ -4,7 +4,7 @@
Vue3 Projekt:
## Project setup
```
npm install
npm ci
```
### Compiles and hot-reloads for development
@ -28,4 +28,24 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
Vorraussetzung: Node & NPM
### 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
```