I'm building an app with separated frontend (Angular 4 - from Angular CLI) and backend app (Asp.Net Core Preview 2.0).
I try to use Docker. Everything works fine but I need to manually publish backend app to ${source:-obj/Docker/publish}. Is it to possible to automate it? For example put the publish code to Dockerfile or docker compose ?
Here's my Dockerfile of my backend app:
FROM microsoft/aspnetcore:2.0
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "Api.dll"]
Here's my Dockerfile of my frontend app:
FROM node:7
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app
RUN npm install
COPY . /usr/src/app
EXPOSE 4200
CMD ["npm", "start"]
Here's my docker-compose:
version: '3.3'
services:
api:
image: api
build:
context: ./Api
dockerfile: Dockerfile
frontend:
image: frontend
build:
context: ./FrontEnd
dockerfile: Dockerfile
Thanks in advance.