version: "2"
services:
  ushahidi:
    platform: linux/amd64
    build: .
    volumes:
      - .tars:/tars
    links:
      - mysql
      - redis
    ports:
      - 80:80
    environment:
      MYSQL_HOST: mysql
      MYSQL_DATABASE: ushahidi
      MYSQL_USER: ushahidi
      MYSQL_PASSWORD: ushahidi
      REDIS_HOST: redis
      REDIS_PORT: "6379"
      CACHE_DRIVER: redis
      # Setting this variable is required for the mobile app to work:
      # SITE_URL: http://example.com
  mysql:
    platform: linux/amd64
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: ushahidi
      MYSQL_USER: ushahidi
      MYSQL_PASSWORD: ushahidi
  redis:
    image: redis:4-alpine
