Add frontend docker
This commit is contained in:
parent
c51f984267
commit
20e8b8d37f
2 changed files with 23 additions and 2 deletions
|
|
@ -1,10 +1,25 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
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:
|
service-authentication:
|
||||||
container_name: service-authentication
|
container_name: service-authentication
|
||||||
build: backend/service-authentication
|
build: ./backend/service-authentication
|
||||||
command: node server.js
|
command: node server.js
|
||||||
volumes:
|
volumes:
|
||||||
- backend/service-authentication
|
- backend/service-authentication
|
||||||
|
|
@ -20,7 +35,7 @@ services:
|
||||||
|
|
||||||
service-message:
|
service-message:
|
||||||
container_name: service-message
|
container_name: service-message
|
||||||
build: backend/service-message
|
build: ./backend/service-message
|
||||||
command: node server.js
|
command: node server.js
|
||||||
volumes:
|
volumes:
|
||||||
- backend/service-message
|
- backend/service-message
|
||||||
|
|
|
||||||
|
|
@ -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 . .
|
||||||
Reference in a new issue