seperate frontend and backend into different containers
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user