version: '3.1'
networks:
  postgres_default:
    external: true
services:
  webserver:
    # container_name: 'web'
    image: 'nginx:alpine'
    working_dir: /app
    volumes:
      - './phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf'
      - './phpdocker/nginx/ssl:/etc/nginx/ssl'
      - '.:/app'
    ports:
      - '80:80'
      - '443:443'
    networks:
      - postgres_default

  php-fpm:
    container_name: 'php7'
    image: 'php-fpm:7.4'
    working_dir: /app
    volumes:
      - './phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.4/fpm/conf.d/99-overrides.ini'
      - '.:/application'
      - '.:/vendor'
    networks:
      - postgres_default
