21 lines
379 B

  1. # -*- mode: shell-script -*-
  2. CONFIG_FILE=/data/gitea/conf/app.ini
  3. ini() {
  4. local action="$1"
  5. shift
  6. crudini "--$action" "$SERVICE_DATASTORE$CONFIG_FILE" "$@"
  7. }
  8. gitea_config_hash() {
  9. config_hash=$(cat "$SERVICE_DATASTORE$CONFIG_FILE" | md5_compat) || exit 1
  10. init-config-add "
  11. $MASTER_BASE_SERVICE_NAME:
  12. labels:
  13. - compose.config_hash=$config_hash
  14. "
  15. }