version: '3' networks: laravel: services: site: build: context: ./dockerfiles dockerfile: nginx.dockerfile args: - UID=${UID:-1000} - GID=${GID:-1000} container_name: nginx ports: - 80:80 volumes: - ./src:/var/www/html:delegated depends_on: - php - redis - mysql - mailhog networks: - laravel mysql: image: mariadb:10.6 container_name: mysql restart: unless-stopped tty: true ports: - 3306:3306 environment: MYSQL_DATABASE: homestead MYSQL_USER: homestead MYSQL_PASSWORD: secret MYSQL_ROOT_PASSWORD: secret SERVICE_TAGS: dev SERVICE_NAME: mysql networks: - laravel php: build: context: ./dockerfiles dockerfile: php.dockerfile args: - UID=${UID:-1000} - GID=${GID:-1000} container_name: php volumes: - ./src:/var/www/html:delegated networks: - laravel redis: image: redis:alpine container_name: redis restart: unless-stopped ports: - 6379:6379 networks: - laravel composer: build: context: ./dockerfiles dockerfile: composer.dockerfile args: - UID=${UID:-1000} - GID=${GID:-1000} container_name: composer volumes: - ./src:/var/www/html working_dir: /var/www/html depends_on: - php user: laravel entrypoint: ['composer', '--ignore-platform-reqs'] networks: - laravel npm: image: node:13.7 container_name: npm volumes: - ./src:/var/www/html ports: - 3000:3000 - 3001:3001 working_dir: /var/www/html entrypoint: ['npm'] networks: - laravel artisan: build: context: ./dockerfiles dockerfile: php.dockerfile args: - UID=${UID:-1000} - GID=${GID:-1000} container_name: artisan volumes: - ./src:/var/www/html:delegated depends_on: - mysql working_dir: /var/www/html entrypoint: ['php', '/var/www/html/artisan'] networks: - laravel mailhog: image: mailhog/mailhog:latest container_name: mailhog ports: - 1025:1025 - 8025:8025 networks: - laravel