version: "3.7"
services:
  app:
    build:
      args:
        user: victorscott
        uid: 1000
      context: ./
      dockerfile: Dockerfile
    image: qms_sys
    container_name: qms-app
    restart: unless-stopped
    working_dir: /var/www/
    volumes:
      - ./:/var/www
    networks:
      - qmsnet

  qmsdbserver:
    image: mysql:5.7
    container_name: qms-db
    restart: unless-stopped
    ports:
        - 33061:${DB_PORT}
    environment:
      MYSQL_DATABASE: ${DB_DATABASE}
      MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
      MYSQL_PASSWORD: ${DB_PASSWORD}
      MYSQL_USER: ${DB_USERNAME}
      SERVICE_TAGS: dev
      SERVICE_NAME: mysql
    networks:
      - qmsnet

  nginx:
    image: nginx:alpine
    container_name: qms-nginx
    restart: unless-stopped
    ports:
      - 8087:80
    volumes:
      - ./:/var/www
      - ./docker-compose/nginx:/etc/nginx/conf.d/
    networks:
      - qmsnet

networks:
  qmsnet:
    driver: bridge
