version: "3.5"

# see ./azure-deploy.sh for notes on how to run

services:

    api-logic-server:
        image: apilogicserver/apilogicserver_project_name_lower
        environment:
          - APILOGICPROJECT_VERBOSE=true
          - SECURITY_ENABLED=true
          - APILOGICPROJECT_CLIENT_URI=//apilogicserver_project_name_lower.azurewebsites.net
          # - APILOGICPROJECT_HTTP_SCHEME=https
          - PYTHONPATH=/app/ApiLogicProject 
          ## todid - specify Database uri's:
          - APILOGICPROJECT_SQLALCHEMY_DATABASE_URI=postgresql://postgres:p@postgres-service/postgres
          - APILOGICPROJECT_SQLALCHEMY_DATABASE_URI_AUTHENTICATION=postgresql://postgres:p@postgres-service/authdb

        expose:
           - 5656
        ports:
            - 5656:5656
        volumes:
            - ${WEBAPP_STORAGE_HOME}/classicmodels:/app
        # container should start automatically - command:  api_logic_server_run.py
        working_dir: /home/api_logic_project

    postgres-service:
        image: apilogicserver/postgres:latest
        restart: always
        environment:
          - PGDATA=/pgdata
          - POSTGRES_PASSWORD=p
        ports:
          - "5432:5432"
