version: "3.3"
services:
  app:
    image: cuahsi/subsetter-ubuntu:0.1a
    build:
      context: ..
      #dockerfile: docker/Dockerfile.subsetter
      dockerfile: docker/Dockerfile.ubuntu
    environment: 
      PYTHONWARNINGS: "ignore:Unverified HTTPS request"
      GDAL_DATA: "/opt/miniconda/share/gdal"
      PROJ_LIB: "/opt/miniconda/share/proj"
      PORT: 8888
      REDIS_URL: redis_db
      REDIS_PORT: 6379
      PF_EXE_DIR: /usr/local
      SSL_CERT: /share/ssl/cuahsi_org_2022.cert
      SSL_KEY: /share/ssl/cuahsi_org_2022.key
      OAUTH_CLIENT_ID: "TjMr7rPA8AkjVvJgDohn0QEIZ2fKDoPNVjVLKYXz"
      OAUTH_CLIENT_SECRET: "Yy5FhCXJQ5C9HRpv467bCkLma8vq1nRk69gl4l0V8qcTOXONR4fO8KCdZv6V0MWsViK1iUK5TFMC0NrX8VaL1lOkejLjTUHdz8qa6QWY2JYa6wbHxZyNdncx5qyACuHR"
      OAUTH_CALLBACK_URL: "https://subset.cuahsi.org/authorize"
      CAS_SERVICE_URL: "https://subset.cuahsi.org/hflogin"
    ports: 
      - "443:8888"
    expose:
      - "443"
    volumes:
      - /share:/share
      - ../tornado-app:/srv
    links:
      - redis_db
  redis_db:
    image: redis:alpine
    ports:
      - "6379:6379"
    expose:
      - "6379"
