Add frontend docker

This commit is contained in:
NyxiumYuuki 2021-05-28 10:06:08 +02:00
parent c51f984267
commit 20e8b8d37f
2 changed files with 23 additions and 2 deletions

View file

@ -1,10 +1,25 @@
version: '3.8'
services:
frontend:
container_name: frontend
build: ./frontend
command: ng serve --host 0.0.0.0
volumes:
- frontend
- frontend/node_modules
ports:
- 4200:4200
depends_on:
- service-authentication
- service-message
links:
- service-authentication
- service-message
service-authentication:
container_name: service-authentication
build: backend/service-authentication
build: ./backend/service-authentication
command: node server.js
volumes:
- backend/service-authentication
@ -20,7 +35,7 @@ services:
service-message:
container_name: service-message
build: backend/service-message
build: ./backend/service-message
command: node server.js
volumes:
- backend/service-message

View file

@ -0,0 +1,6 @@
FROM node:current-slim
WORKDIR /app-frontend
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install --NODE_ENV
RUN npm install -g @angular/cli
COPY . .