version: '3'
services:
webserver:
image: nginx:alpine
restart: unless-stopped
tty: true
ports:
- "80:80"
- "443:443"
volumes:
- ./apps/ApiGateway/:/var/www/ApiGateway
- ./apps/MS-AvailableHotels/:/var/www/MS-AvailableHotels
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/sites/:/etc/nginx/conf.d/
- ./docker/nginx/ssl/:/etc/ssl/
networks:
- app-network
ApiGateway:
build:
context: apps/ApiGateway
dockerfile: Dockerfile
image: digitalocean.com/php
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: ApiGateway
SERVICE_TAGS: dev
working_dir: /var/www/ApiGateway
volumes:
- ./apps/ApiGateway/:/var/www/ApiGateway
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
MS-AvailableHotels:
build:
context: apps/MS-AvailableHotels
dockerfile: Dockerfile
image: digitalocean.com/php
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: MS-AvailableHotels
SERVICE_TAGS: dev
working_dir: /var/www/MS-AvailableHotels
volumes:
- ./apps/MS-AvailableHotels/:/var/www/MS-AvailableHotels
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
Front-End-App:
build:
context: apps/Front-End-App
dockerfile: Dockerfile
image: digitalocean.com/php
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: Front-End-App
SERVICE_TAGS: dev
working_dir: /var/www/Front-End-App
volumes:
- ./apps/Front-End-App/:/var/www/Front-End-App
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
# we don't need databases in this example but it's good to create one!
db:
image: mysql:8.0
restart: unless-stopped
tty: true
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: Dispenser_db
MYSQL_ROOT_PASSWORD: root
SERVICE_NAME: mysql
SERVICE_TAGS: dev
volumes:
- dbdata:/var/lib/mysql/
- ./docker/mysql/my.cnf:/var/lib/mysql/my.cnf
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
dbdata:
driver: local
|