mailcow / mailcow-dockerized-docs

mailcow: dockerized - documentation 📰
https://docs.mailcow.email
87 stars 214 forks source link

[gitea] repositories lost after upgrade #540

Closed fabreg closed 1 year ago

fabreg commented 1 year ago

Basically the update script uses "docker-compose down" in order to stop the containers before upgrading it. After upgrade, you will not able to browse any existing repository (you will see them on gitea -only the name- but you are unable to use it)

Step to reproduce:

The Git data underlying this repository cannot be read. Contact the administrator of this instance or delete this repository.

This is my /opt/mailcow-dockerized/data/gitea/gitea/conf/app.ini

APP_NAME = Gitea: Git with a cup of tea
RUN_USER = git
RUN_MODE = prod

[server]
APP_DATA_PATH    = /data/gitea
SSH_LISTEN_PORT  = 22
# For GITEA_SSH_PORT=127.0.0.1:4000 in mailcow.conf, set:
SSH_DOMAIN       = mx.example.org
SSH_PORT         = 4000
# For MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (and default ports for HTTPS), set:
ROOT_URL         = https://mx.example.org/gitea/
DOMAIN           = mx.example.org
HTTP_PORT        = 3000
DISABLE_SSH      = false
LFS_START_SERVER = true
LFS_JWT_SECRET   = xxx
OFFLINE_MODE     = false

[database]
DB_TYPE  = mysql
HOST     = mysql
NAME     = gitea
USER     = gitea
PASSWD   = aaaa
SCHEMA   = 
SSL_MODE = disable
CHARSET  = utf8
PATH     = /app/gitea/data/gitea.db
LOG_SQL  = false

[repository]
ROOT = /app/gitea/data/gitea-repositories

[lfs]
PATH = /app/gitea/data/lfs

[mailer]
ENABLED        = true
FROM           = xxx
MAILER_TYPE    = smtp
SMTP_ADDR      = aa.xxx.org
SMTP_PORT      = 587
IS_TLS_ENABLED = false
USER           = xxx@xxx.com
PASSWD         = `xxxxx`

[service]
REGISTER_EMAIL_CONFIRM            = false
ENABLE_NOTIFY_MAIL                = false
DISABLE_REGISTRATION              = true
ALLOW_ONLY_EXTERNAL_REGISTRATION  = false
ENABLE_CAPTCHA                    = false
REQUIRE_SIGNIN_VIEW               = false
DEFAULT_KEEP_EMAIL_PRIVATE        = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING       = true
NO_REPLY_ADDRESS                  = noreply.mx.example.org

[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true

[session]
PROVIDER = file

[log]
MODE      = console
LEVEL     = info
ROOT_PATH = /app/gitea/log
ROUTER    = console

[repository.pull-request]
DEFAULT_MERGE_STYLE = merge

[repository.signing]
DEFAULT_TRUST_MODEL = committer

[security]
INSTALL_LOCK       = true
INTERNAL_TOKEN     = xxxxxfddfdfdg
PASSWORD_HASH_ALGO = pbkdf2

and docker-compose.override.yml

version: '2.1'
services:

        gitea-mailcow:
            image: gitea/gitea:1
            environment:
              - USER_UID=1001
              - USER_GID=1001
            volumes:
                - ./data/gitea:/data
            networks:
                mailcow-network:
                    aliases:
                        - gitea
            ports:
                - "${GITEA_SSH_PORT:-127.0.0.1:4000}:22"

Thank you!

DerLinkman commented 1 year ago

Havn't checked it yet but it's not docker-down it's docker compose down.

Are you sure you did not modified something else on the data of your gitea installation?

fabreg commented 1 year ago

Hello, typo, sorry, I've correct on the original post. On the data I have simply added the [mailler] section and, under [service] disable the registration DISABLE_REGISTRATION = true Thank you.