[gitea] repositories lost after upgrade
fabreg opened this issue · comments
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:
- Login to https://youweb/gitea
- create a repository (doesn't matter if public or private)
- back on terminal: cd /opt/mailcow-dockerized && docker-compose down && docker-compose up -d
- Login back to gitea and try to browse the repository. You will see a message like this:
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!
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?
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.