# This docker-compose file is used for SaaS / billing-enabled deployments.
# It extends docker-compose.yml with the home container.

x-common-depends-on: &common-depends-on
    postgres:
        condition: service_healthy
    redis:
        condition: service_healthy
    clickhouse:
        condition: service_healthy

services:

    redis:
        extends:
            file: ./docker-compose.base.yml
            service: redis

    clickhouse:
        extends:
            file: ./docker-compose.base.yml
            service: clickhouse

    postgres:
        ports:
          - "5400:5432"
        extends:
            file: ./docker-compose.base.yml
            service: postgres


    app:
        image:  oneuptime/app:${APP_TAG}
        extends:
            file: ./docker-compose.base.yml
            service: app
        depends_on:
            <<: *common-depends-on

    home:
        image:  oneuptime/home:${APP_TAG}
        extends:
            file: ./docker-compose.base.yml
            service: home
        depends_on:
            <<: *common-depends-on

    probe-1:
        image:  oneuptime/probe:${APP_TAG}
        extends:
            file: ./docker-compose.base.yml
            service: probe-1
        depends_on:
            <<: *common-depends-on

    ingress:
       image:  oneuptime/nginx:${APP_TAG}
       extends:
            file: ./docker-compose.base.yml
            service: ingress
       depends_on:
            <<: *common-depends-on

volumes:
    postgres:
    clickhouse:

networks:
  oneuptime:
    driver: bridge
