version: '3'
services:
  web:
    image: ${IMAGE_APP}
    env_file:
      - .env
    restart: unless-stopped
    volumes:
    - ./:/var/www
    container_name: ${SERVICE_NAME_APP}
    networks:
      - knox-network
  nginx:
    image: nginx:alpine
    env_file:
      - .env
    container_name: ${SERVICE_NAME_NGINX}
    restart: unless-stopped
    ports:
      - ${PORT}:80
    volumes:
      - ./:/var/www
      - ./docker-compose/nginx:/etc/nginx/conf.d/
    networks:
      - knox-network
networks:
  knox-network:
    external: true
