version: '3'
services:

  #PHP Service
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: gabolaravelegcv2
    restart: unless-stopped
    tty: true
    environment:
      SERVICE_NAME: gabolaravelegcv2
      SERVICE_TAGS: dev
      APP_NAME: 'GABO Laravel EGC v2 docker'
      APP_SCHEME: 'http'
      APP_ENV: 'local'
      APP_DEBUG: 'true'
      APP_MARKET: 'it'
      APP_LOG_LEVEL: 'debug'
      APP_KEY: base64:cRfc/LEdPag45S/ef06vf9Ii+adk+XaB4nC2aDMsYQk=
      APP_URL: http://127.0.0.1:8000
      API_BOPROXY_URL: https://testapi.esagaming.it/backend_atomo_qa/BO_proxy.php?wsdl
      API_BOPROXY_ACCOUNT: super_secret_bo_user
      API_BOPROXY_PASSWORD: super_secret_bo_pass
      API_HIVE_URL: https://testapi.esagaming.it/backend_qai/thirdparty_service.php?wsdl
      API_HIVE_ACCOUNT: pw
      API_HIVE_PASSWORD: pwpass
      API_AFFILIATE_URL: https://testapi.esagaming.it/backend_atomo_qa/affiliate_proxy.php?wsdl
      API_AFFILIATE_ACCOUNT: superuser
      API_AFFILIATE_PASSWORD: L3tMe!n
      ELASTIC_HOST: 127.0.0.1
      ELASTIC_PORT: 9200
      ELASTIC_INDEX: egc
      DATATABLE_LIMIT: 10000
      APP_LOCALE: en
      GLOBAL_CURRENCY: EUR
      WHITELIST_IP: 127.0.0.1
      LOG_CHANNEL: single
      BROADCAST_DRIVER: log
      CACHE_DRIVER: file
      QUEUE_CONNECTION: sync
      SESSION_DRIVER: file
      SESSION_LIFETIME: 55
      DB_HOST_GAMESERVICE_RW: 192.168.7.2
      DB_DATABASE_GAMESERVICE_RW: gameservice_it
      DB_USERNAME_GAMESERVICE_RW: pokerbonew
      DB_PASSWORD_GAMESERVICE_RW: 9BfPLMtvDjqe
      DB_HOST_GAMESERVICE_RO: 192.168.7.2
      DB_DATABASE_GAMESERVICE_RO: gameservice_it
      DB_USERNAME_GAMESERVICE_RO: pokerbonew
      DB_PASSWORD_GAMESERVICE_RO: 9BfPLMtvDjqe
      DB_HOST_POKER_RW: 192.168.7.2
      DB_DATABASE_POKER_RW: poker_qai_it
      DB_USERNAME_POKER_RW: pokerbonew
      DB_PASSWORD_POKER_RW: 9BfPLMtvDjqe
      DB_HOST_POKER_RO: 192.168.7.2
      DB_DATABASE_POKER_RO: poker_qai_it
      DB_USERNAME_POKER_RO: pokerbonew
      DB_PASSWORD_POKER_RO: 9BfPLMtvDjqe
      SENTRY_LARAVEL_DSN: https://05ef069019664f148699c6c6cb2a7f33@o496107.ingest.sentry.io/5569925
      SENTRY_TRACES_SAMPLE_RATE: 1
      DB_CONNECTION: gameservice-ro
    working_dir: /var/www
    volumes:
      - ./:/var/www
      - ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
    networks:
      - app-network

  #Nginx Service
  webserver:
    image: nginx:alpine
    container_name: gabo-ngx
    restart: unless-stopped
    tty: true
    ports:
      - "8000:80"
      - "8443:443"
    volumes:
      - ./:/var/www
      - ./docker/nginx/conf.d/:/etc/nginx/conf.d/
    networks:
      - app-network

#Docker Networks
volumes:
  db-data:
networks:
  app-network:
    driver: bridge
