version: '2.2'

networks:
    app:

services:
    api.app:
        container_name: api.app
        image: centos:centos7
        volumes:
         - /root/core/api:/var/api
        environment:
         - SET_CONTAINER_TIMEZONE=true
         - CONTAINER_TIMEZONE=Asia/Shanghai
        working_dir: /var/api
        command: ./app api
        ports:
         - 8080:8080
        networks:
         - app
        restart: always
        extra_hosts:  
		 - "host.docker.internal:host-gateway"
    web.app:
        container_name: web.app
        image: centos:centos7
        logging:
        	driver: json-file
        	options:
        		max-size: 1g
        volumes:
         - /root/core/api:/var/web
        environment:
         - SET_CONTAINER_TIMEZONE=true
         - CONTAINER_TIMEZONE=Asia/Shanghai
        working_dir: /var/web
        command: ./app web
        ports:
         - 80:80
        networks:
         - app
        restart: always
        extra_hosts:  
		 - "host.docker.internal:host-gateway"