seperate frontend and backend into different containers

This commit is contained in:
GotPPay
2018-06-19 05:10:21 +02:00
parent 2535eb0d25
commit 90f80facb2
5 changed files with 23 additions and 78 deletions

View File

@@ -1,20 +1,28 @@
version : '2'
services:
web:
backend:
build:
context: .
dockerfile: web.dockerfile
dockerfile: backend.dockerfile
volumes:
- ./log/web/:/var/log/apache2/
- ./log/backend/:/var/log/apache2/
ports:
- '8080:80'
- '8081:443'
- '8081:80'
depends_on:
- db
#use links keywoard to use db as a known host "db" to connect to database
links:
- db
frontend:
build:
context: .
dockerfile: frontend.dockerfile
volumens:
- ./log/frontend/:/var/log/apache2/
ports:
- '8080:80'
db:
build: