# SPDX-FileCopyrightText: 2025 The HedgeDoc developers (see AUTHORS file)
# SPDX-License-Identifier: AGPL-3.0-only
---
services:
  mariadb:
    # renovate: datasource=docker depName=mariadb
    image: mariadb:11.8.6@sha256:8164f184d16c30e2f159e30518113667b796306dff0fe558876ab1ff521a682f
    environment:
      MARIADB_USER: hedgedoc
      MARIADB_PASSWORD: hedgedoc
      MARIADB_DATABASE: hedgedoc
      MARIADB_ROOT_PASSWORD: hedgedoc
      MARIADB_MYSQL_LOCALHOST_USER: 1
      MARIADB_MYSQL_LOCALHOST_GRANTS: USAGE
    healthcheck:
      test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
      start_period: 10s
      interval: 10s
      timeout: 5s
      retries: 3
    ports:
      - "3306:3306"
  postgres:
    # renovate: datasource=docker depName=postgres
    image: postgres:16.13@sha256:78df81b1442dcc764c1104154da7162635e40cfffe67579c42a1c1b96dfc209c
    environment:
      POSTGRES_PASSWORD: hedgedoc
      POSTGRES_USER: hedgedoc
    healthcheck:
      test: [ "CMD", "pg_isready" ]
      start_period: 10s
      interval: 5s
      timeout: 2s
      retries: 5
    ports:
      - "5432:5432"
