# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

services:
  postgresql:
    image: docker.io/bitnami/postgresql:latest
    volumes:
      - 'postgresql_data:/bitnami/postgresql'
    environment:
      - POSTGRESQL_DATABASE=bitnami_gitea
      - POSTGRESQL_USERNAME=bn_gitea
      - POSTGRESQL_PASSWORD=bitnami1
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
  gitea:
    image: docker.io/bitnami/gitea:1
    volumes:
      - 'gitea_data:/bitnami/gitea'
    environment:
      - GITEA_DATABASE_HOST=postgresql
      - GITEA_DATABASE_NAME=bitnami_gitea
      - GITEA_DATABASE_USERNAME=bn_gitea
      - GITEA_DATABASE_PASSWORD=bitnami1
    ports:
      - '3000:3000'
      - '2222:2222'
volumes:
  postgresql_data:
    driver: local
  gitea_data:
    driver: local
