version: '2'

volumes:
    logs:
        driver: local
    catalog_data:

services:
    slim:
        build:
          dockerfile: Dockerfile
          context: .
        working_dir: /var/www
        command: php -S 0.0.0.0:8080 -t public public/index.php
        environment:
            docker: "true"
            DATABASE_URL: "mysql:host=mysql;dbname=products"
            DATABASE_USER: "root"
            DATABASE_PWD: ""
        ports:
            - 8080:8080
        volumes:
            - .:/var/www
            - logs:/var/www/logs

    mysql:
        image: mysql:8
        environment:
          MYSQL_DATABASE: products
          MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
        ports:
             - 3603:3603
        volumes:
            - ./catalog_data:/docker-entrypoint-initdb.d

    nginx:
        image: nginx
        

version: '2'

volumes:
    logs:
        driver: local
    catalog_data:

services:
    slim:
        build:
          dockerfile: Dockerfile
          context: .
        working_dir: /var/www
        command: php -S 0.0.0.0:8080 -t public public/index.php
        environment:
            docker: "true"
            DATABASE_URL: "mysql:host=mysql;dbname=products"
            DATABASE_USER: "root"
            DATABASE_PWD: ""
        ports:
            - 8080:8080
        volumes:
            - .:/var/www
            - logs:/var/www/logs

    mysql:
        image: mysql:8
        environment:
          MYSQL_DATABASE: products
          MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
        ports:
             - 3603:3603
        volumes:
            - ./catalog_data:/docker-entrypoint-initdb.d

Drop nginx from docker stack
Drop nginx from docker stack
