default_env: &default_env
    WARTHOG_INTROSPECTION: true
    WARTHOG_SUBSCRIPTIONS: true
    WARTHOG_PLAYGROUND: true
    WARTHOG_DB_SYNCHRONIZE: false  
    ## if the DB is synced, the new columns 
    ## created by migrations are dropped, no good
    ## one should run `WARTHOG_DB_SYNCHRONIZE=true yarn sync` manually instead
    WARTHOG_DB_OVERRIDE: false
    WARTHOG_DB_DATABASE: ${env:DB_NAME}
    WARTHOG_DB_USERNAME: ${env:DB_USER}
    WARTHOG_DB_PASSWORD: ${env:DB_PASS}
    WARTHOG_DB_HOST: ${env:DB_HOST}
    WARTHOG_DB_PORT: ${env:DB_PORT}
    WARTHOG_APP_PORT: ${env:GRAPHQL_SERVER_PORT}
    WARTHOG_APP_HOST: ${env:GRAPHQL_SERVER_HOST}
    GRAPHQL_SERVER_PORT: ${env:GRAPHQL_SERVER_PORT}
    GRAPHQL_SERVER_HOST: ${env:GRAPHQL_SERVER_HOST}
    
    PGDATABASE: ${env:DB_NAME}
    PGUSER: ${env:DB_USER}
    PGPASSWORD: ${env:DB_PASS}
    PGHOST: ${env:DB_HOST}
    PGPORT: ${env:DB_PORT}

development:
    <<: *default_env
    DEBUG: 'qnode-cli:*'
    NODE_ENV: development

staging:
    <<: *default_env

production:
    NODE_ENV: production
    WARTHOG_DB_ENTITIES: dist/src/**/*.model.js  
    WARTHOG_DB_SUBSCRIBERS: dist/src/**/*.model.js
    WARTHOG_RESOLVERS_PATH: dist/src/**/*.resolver.js
    WARTHOG_DB_MIGRATIONS: dist/db/migrations/**/*.js
    DEBUG: 'qnode-cli:*'
    <<: *default_env
  