version: "3" services: web: container_name: web build: context: . args: PORT: 3000 dockerfile: ./apps/web/Dockerfile restart: always env_file: - ./.env ports: - 3000:3000 networks: - app_network admin: container_name: admin build: context: . args: PORT: 3010 dockerfile: ./apps/admin/Dockerfile restart: always env_file: - ./.env ports: - 3010:3010 networks: - app_network api: container_name: api build: context: . args: PORT: 3020 dockerfile: ./apps/api/Dockerfile restart: always env_file: - ./.env ports: - 3020:3020 networks: - app_network # Define a network, which allows containers to communicate # with each other, by using their container name as a hostname networks: app_network: external: true