# compose file versions evolve with new docker versions, see compatibility matrix
# https://docs.docker.com/compose/compose-file/compose-versioning/#compatibility-matrix
# On Dev machines, we use the latest docker version, however on servers
# we stick to fixed, older versions. We still use Docker v1.11 on servers, that leaves us with 
# docker-compose version 2
version: '2'

services:

  # service name convention: Same as github repo. If there are multiple services in one repo, naming
  # is <repo>-<name>
  testable-reactions:

    # how to build the docker image
    build:
      # context defines the root directory for COPY instructions within the Dockerfile
      context: .
      dockerfile: docker/Dockerfile

    # name of the created image. Convention is same name as service, with tag local-latest to 
    # distinguish from other builds like stage-latest or prod-latest
    image: testable-reactions:local-latest

    # maps port from the container (second number) to this machine host (first number). The container port is can be
    # anything the service wants, but the host port has several limitions in for deployment. See README.md. Services
    # are easier deployed when host and container port are the same
    ports:
      - 4080:4080
