[PR #5290] [MERGED] migrate database if app.ini found #17741

Closed
opened 2025-11-02 15:26:36 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/5290
Author: @pciavald
Created: 11/7/2018
Status: Merged
Merged: 1/5/2019
Merged by: @techknowlogick

Base: masterHead: migrate-db-if-config


📝 Commits (5)

  • a161f18 migrate database if app.ini found
  • 670f44b replacing hard-coded user id by env variable
  • 8caca61 Merge branch 'master' into migrate-db-if-config
  • e9469e6 Update per @zeripath's feedback
  • 81be951 Merge branch 'master' into migrate-db-if-config

📊 Changes

1 file changed (+15 additions, -0 deletions)

View changed files

📝 docker/usr/bin/entrypoint (+15 -0)

📄 Description

Hi,

For my installation of gitea, I needed unattended initial config. @techknowlogick told me on Discord that it could be done using then new migrate command, gitea migrate -c /data/gitea/conf/app.ini.

I've added in the Docker entrypoint:

  • check if /data/gitea/conf/app.ini exists
  • change mode and owner
  • migrate database

It works correctly on my machine, in my docker-compose the data volume is mapped with only the config file and the platform auto-inits. However I can see in the logs this error which does not affect behaviour:

migrate: /data/gitea/conf/app.ini: Permission denied

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/5290 **Author:** [@pciavald](https://github.com/pciavald) **Created:** 11/7/2018 **Status:** ✅ Merged **Merged:** 1/5/2019 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `migrate-db-if-config` --- ### 📝 Commits (5) - [`a161f18`](https://github.com/go-gitea/gitea/commit/a161f18f440f70827e92aaef62c9cfcdcf11f2b5) migrate database if app.ini found - [`670f44b`](https://github.com/go-gitea/gitea/commit/670f44b9ab6e336f4b68ad0e80117a23213611b6) replacing hard-coded user id by env variable - [`8caca61`](https://github.com/go-gitea/gitea/commit/8caca61622dd7aaca4445d75b4247a05e502a0e7) Merge branch 'master' into migrate-db-if-config - [`e9469e6`](https://github.com/go-gitea/gitea/commit/e9469e61286f26ad876f01e7e58ca1df9a4a3490) Update per @zeripath's feedback - [`81be951`](https://github.com/go-gitea/gitea/commit/81be9519c279240adaada940ec07005493ba18ea) Merge branch 'master' into migrate-db-if-config ### 📊 Changes **1 file changed** (+15 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docker/usr/bin/entrypoint` (+15 -0) </details> ### 📄 Description Hi, For my installation of gitea, I needed unattended initial config. @techknowlogick told me on Discord that it could be done using then new migrate command, `gitea migrate -c /data/gitea/conf/app.ini`. I've added in the Docker entrypoint: - check if `/data/gitea/conf/app.ini` exists - change mode and owner - migrate database It works correctly on my machine, in my docker-compose the data volume is mapped with only the config file and the platform auto-inits. However I can see in the logs this error which does not affect behaviour: ``` migrate: /data/gitea/conf/app.ini: Permission denied ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 15:26:36 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17741