version: '3' networks: mtc_net: volumes: local_pgdata_mtc: pgadmin_data_mtc: services: app_mtc: container_name: app_mtc build: context: ./dockerfiles dockerfile: nginx.dockerfile args: - UID=${UID:-1000} - GID=${GID:-1000} ports: - "80:80" volumes: - ./src:/var/www/html:delegated depends_on: - php - redis_mtc - db_mtc - mailhog_mtc - pgadmin_mtc networks: - mtc_net db_mtc: image: postgres container_name: db_mtc ports: - "5432:5432" environment: POSTGRES_DB: mtc_db POSTGRES_USER: mtc_user POSTGRES_PASSWORD: secret volumes: - local_pgdata_mtc:/var/lib/postgresql/data #- ./rauru_pgdata:/var/lib/postgresql/data networks: - mtc_net pgadmin_mtc: image: dpage/pgadmin4 container_name: pgadmin_mtc ports: - "5050:80" depends_on: - db_mtc environment: PGADMIN_DEFAULT_EMAIL: admin@example.de PGADMIN_DEFAULT_PASSWORD: secret volumes: - pgadmin_data_mtc:/var/lib/pgadmin #- ./pgadmindata:/var/lib/pgadmin networks: - mtc_net php: build: context: ./dockerfiles dockerfile: php.root.dockerfile args: - UID=${UID:-1000} - GID=${GID:-1000} container_name: php ports: - "9000:9000" volumes: - ./src:/var/www/html:delegated networks: - mtc_net redis_mtc: image: redis:alpine container_name: redis_mtc restart: unless-stopped ports: - "6379:6379" networks: - mtc_net composer_mtc: build: context: ./dockerfiles dockerfile: php.root.dockerfile args: - UID=${UID:-1000} - GID=${GID:-1000} container_name: composer_mtc volumes: - ./src:/var/www/html depends_on: - php entrypoint: [ 'composer', '--ignore-platform-reqs' ] networks: - mtc_net npm_mtc: image: node:current-alpine container_name: npm_mtc volumes: - ./src:/var/www/html ports: - "3000:3000" - "3001:3001" - "5173:5173" working_dir: /var/www/html entrypoint: [ 'npm' ] networks: - mtc_net artisan_mtc: build: context: ./dockerfiles dockerfile: php.root.dockerfile args: - UID=${UID:-1000} - GID=${GID:-1000} container_name: artisan_mtc volumes: - ./src:/var/www/html:delegated depends_on: - db_mtc entrypoint: [ 'php', '/var/www/html/artisan' ] networks: - mtc_net mailhog_mtc: container_name: mailhog_mtc image: mailhog/mailhog:latest ports: - "1025:1025" - "8025:8025" networks: - mtc_net