docker-compose.yml 788 Bytes
version: '2'
services:
  web:
    image: nginx:latest
    ports:
      - 8080:80
    volumes:
      - ./site.conf:/etc/nginx/conf.d/default.conf
    volumes_from:
      - flarum
    links:
      - flarum
    networks:
      - docker_flarum
      - nginx_web
  flarum:
    build: flarum/
    volumes:
      - ./flarum/html:/var/www/html
    # ports:
      # - "9003:9000"
    networks:
      - docker_flarum
  mariadb:
    build: mariadb/
    environment:
      - MYSQL_ROOT_PASSWORD=root_password
      - MYSQL_DATABASE=flarum
      - MYSQL_USER=flarum
      - MYSQL_PASSWORD=flarum
    volumes:
      - ./mariadb/database:/var/lib/mysql
    # ports:
    #   - "3306:3306"
    networks:
      - docker_flarum
networks:
  nginx_web:
     external: true
  docker_flarum:
    driver: bridge