---
services:
  my_service:
    environment:
      - USER_UID=${GITEA_UID}
      - USER_GID=${GITEA_GID}
      - GITEA__database__DB_TYPE=${RDBMS}
      - GITEA__database__HOST=my_db:${RDBMS_PORT}
      - GITEA__database__NAME=${DB_NAME}
      - GITEA__database__USER=${DB_USER}
      - GITEA__database__PASSWD=${DB_PASSWD}
    volumes:
      - ${GITEA_PATH_HOST}:${GITEA_PATH_CONTAINER}
      - ${GITEA_ACCOUNT_SSH}:${GITEA_SSH_PATH_CONTAINER}

    ports:
      - "${GITEA_SSH_EXPOSE}:${GITEA_SSH_CONTAINER}"
      - "${GITEA_IP_SSH_EXPOSE}:${GITEA_SSH_CONTAINER}"

  my_db:
    environment:
      - POSTGRES_USER=${DB_USER}
      - POSTGRES_PASSWORD=${DB_PASSWD}
      - POSTGRES_DB=${DB_NAME}
    volumes:
      - ${POSTGRES_VOL_PATH_HOST}:${POSTGRES_PATH_CONTAINER}
