version: '3'

networks:
  jxnet:
    driver: bridge
    ipam:
      config:
        - subnet: 172.18.0.0/16

services:
  jxcms:
    build: .
    image: jxcms
    container_name: jxcms
    env_file: jxcms.env
    networks:
      - jxnet
    volumes:
      - /var/testlog/jxcms/:/opt/tomcat8/logs/

  jxdiscuz:
    image: jxdiscuz-mysql-36:1.0
    container_name: jxdiscuz
    networks:
      - jxnet
    volumes:
      - /var/testlog/jxdiscuz/:/var/log/apache2/

  jxsea:
    image: jxsea-mysql-36:1.0
    container_name: jxsea
    networks:
      - jxnet
    volumes:
      - /var/testlog/jxsea/:/var/log/apache2/

  jxchandao:
    image: jxchandao-mysql-36:1.0
    container_name: jxchandao
    networks:
      - jxnet
    volumes:
      - /var/testlog/jxchandao/:/var/log/apache2/

  jxnginx:
    build: jxnginx
    image: jxnginx
    container_name: jxnginx
    env_file: jxnginx/jxnginx.env
    networks:
      - jxnet
    ports:
      - "80:80"
    volumes:
      - /var/testlog/jxnginx/:/var/log/nginx/
    depends_on:
      - jxcms
      - jxdiscuz
      - jxsea
      - jxchandao
