version: '3'

networks:
  main-network:

services:
  mssql:
    image: mcr.microsoft.com/mssql/server:${MSSQL_VERSION:-2017}-latest
    container_name: sqlserver
    environment:
      ACCEPT_EULA: Y
      MSSQL_SA_PASSWORD: super01S3cUr3
    ports:
      - "1433:1433"
    network_mode: "host"

  toxiproxy:
    image: shopify/toxiproxy
    container_name: toxiproxy
    command: '/toxiproxy -host=127.0.0.1'
    network_mode: "host"

  cimgruby:
    image: "cimg/ruby:${RUBY_VERSION:-2.7}"
    container_name: cimg_ruby
    environment:
      TESTOPTS: '-v'
      TINYTDS_UNIT_HOST: '127.0.0.1'
      SA_PASSWORD: super01S3cUr3
      TOXIPROXY_HOST: '127.0.0.1'
    command: tail -F anything
    volumes:
      - .:/home/circleci/project
    network_mode: "host"
