version: '3.7' networks: backend: driver: bridge services: nginx: build: context: docker/nginx container_name: nginx ports: - "8080:80" volumes: - ./src:/var/www - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf depends_on: - php - db networks: - backend db: build: context: docker/mysql container_name: db restart: unless-stopped tty: true ports: - "3306:3306" environment: MYSQL_DATABASE: ${DB_DATABASE} MYSQL_USER: ${DB_USERNAME} MYSQL_PASSWORD: ${DB_PASSWORD} MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} SERVICE_TAGS: dev SERVICE_NAME: db volumes: - ./data/mysql:/var/lib/mysql networks: backend: aliases: - db.pacificsky.ru phpmyadmin2: container_name: phpmyadmin2 image: phpmyadmin restart: always ports: - "8092:80" environment: - PMA_HOST=db depends_on: - db networks: - backend php: build: context: docker/php-fpm container_name: php volumes: - ./src:/var/www ports: - "9000:9000" networks: - backend