# Images are pushed to both Docker Hub and Github Container Registry. If you're using Github Container Registry, you can change the image tag to use the Github Container Registry.
# For example, if you want to use the image from Github Container Registry, you can change the image tag from oneuptime/dashboard:latest to ghcr.io/oneuptime/dashboard:latest

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" # for access to postgres for backups. If you don't need backup, you can comment this line out to make it more secure.
        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

    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
