version: '3.1'

services:
  server:
    container_name: gitea
    image: gitea/gitea:latest
    environment:
      - USER_UID=115
      - USER_GID=119
      - DB_TYPE=postgres
      - DB_HOST=db:5432
      - DB_NAME=gitea
      - DB_USER=bizmatch
      - DB_PASSWD=gitea
      - GITEA__server__MINIMUM_KEY_SIZE_CHECK=false
      - GITEA__server__HTTP_PORT=3500
    restart: unless-stopped
    networks:
      - gitea
    volumes:
      - gitea-data:/data
      #- ./gitea/gitea-ssh:/data/git/.ssh
      - /home/git/.ssh/:/data/git/.ssh
    ports:
      - "3500:3500"
      - "2222:22"

  db:
    container_name: postgres_gitea
    image: postgres:alpine
    environment:
      - POSTGRES_USER=bizmatch
      - POSTGRES_PASSWORD=gitea
      - POSTGRES_DB=gitea
    restart: unless-stopped
    networks:
      - gitea
    volumes:
      - gitea-db:/var/lib/postgresql/data

networks:
  gitea:
    external: true

volumes:
  gitea-data:
  gitea-db:
