version: "3.7"

x-backend-variable: &backend-variable
  # DOCKER_PROXY_URL: aspnet-core # not working with docker yet
  # DOCKER_PROXY_URL: node
  # DOCKER_PROXY_URL: python
  # DOCKER_PROXY_URL: ruby

services:
  aspnet-core:
    build:
      context: .
      dockerfile: mx-platform-aspnet-core/Dockerfile
    entrypoint: sh -c "dotnet mx-platform-aspnet-core.dll"
    env_file: .env
    environment:
      - ASPNETCORE_ENVIRONMENT=development
    image: mx-quickstart-aspnet
    ports:
      - 8000:80
  node:
    image: mx-quickstart-node
    build:
      context: .
      dockerfile: ./mx-platform-node/Dockerfile
    env_file: .env
    ports:
      - 8000:8000
  python:
    image: mx-quickstart-python
    build:
      context: .
      dockerfile: ./python/Dockerfile
    env_file: .env
    ports:
      - 8000:8000
  ruby:
    image: mx-quickstart-ruby
    build:
      context: .
      dockerfile: ./ruby/Dockerfile
    env_file: .env
    ports:
      - 8000:8000
  frontend:
    build:
      context: .
      dockerfile: ./frontend/Dockerfile
    ports:
      - 3000:3000
    environment:
      <<: *backend-variable
