[Docker] [1.16.8] Code update in web UI error: "Unable to find configuration file: "/etc/gitea/app.ini"" #9191

Closed
opened 2025-11-02 08:31:55 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @GAS85 on GitHub (Jul 7, 2022).

Description

Deploy gitea with docker and mounted local storage. Do commit via WebUI and see an error.
Check logs and see an error, as workaround add volume to the docker - ${WORKINGDIR}/docker/gitea/gitea/conf/app.ini:/etc/gitea/app.ini --> This basically remap existing docker managed app.ini to the /etc/gitea/app.ini in Container.

Expectation:
Existing app.ini in container under /data/gitea/config/app.ini should be taken into account.

Gitea Version

1.16.8

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://sitnikov.ga/pastebin/z5IECRQ-ag3itJLXo6pfb

Screenshots

grafik

Git Version

2.30.3

Operating System

Ubuntu 20.04

How are you running Gitea?

Via docker-compose. Line - ${WORKINGDIR}/docker/gitea/gitea/conf/app.ini:/etc/gitea/app.ini been add to make it run.

version: "3.6"
services:
  gitea:
    image: gitea/gitea:1.16
    container_name: gitea
    environment:
      - USER_UID=${PUID}
      - USER_GID=${PGID}
      # https://docs.gitea.io/en-us/config-cheat-sheet
      - GITEA__RUN_MODE=prod
      - GITEA__server__PROTOCOL=http
      - GITEA__server__DOMAIN=***someValue***
      - GITEA__server__ROOT_URL=https://***someValue***/
      - GITEA__server__DISABLE_SSH=true
      - GITEA__server__OFFLINE_MODE=false
      - GITEA__server__LFS_START_SERVER=true
      - GITEA__server__LFS_JWT_SECRET=***someValue***
      - GITEA__oauth2__JWT_SECRET=***someValue***
      - GITEA__security__INTERNAL_TOKEN=***someValue***
      - GITEA__security__INSTALL_LOCK=true
      - GITEA__security__SECRET_KEY=***someValue***
      - GITEA__database__DB_TYPE=mysql
      - GITEA__database__HOST=/var/run/mysqld/mysqld.sock
      - GITEA__database__NAME=***someValue***
      - GITEA__database__USER=***someValue***
      - GITEA__database__PASSWD=***someValue***
      - GITEA__database__SSL_MODE=disable
      - GITEA__database__LOG_SQL=false
      - GITEA__database__CHARSET=utf8
      - GITEA__service__REGISTER_EMAIL_CONFIRM=false
      - GITEA__service__ENABLE_NOTIFY_MAIL=false
      - GITEA__service__DISABLE_REGISTRATION=true
      - GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION=false
      - GITEA__service__ENABLE_CAPTCHA=false
      - GITEA__service__REQUIRE_SIGNIN_VIEW=false
      - GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE=false
      - GITEA__service__DEFAULT_ALLOW_CREATE_ORGANIZATION=true
      - GITEA__service__DEFAULT_ENABLE_TIMETRACKING=true
      - GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE=true
      - GITEA__mailer__ENABLED=true
      - GITEA__mailer__HOST=***someValue***
      - GITEA__mailer__FROM=***someValue***
      - GITEA__mailer__USER=***someValue***
      - GITEA__mailer__PASSWD=***someValue***
      - GITEA__picture__DISABLE_GRAVATAR=true
      - GITEA__picture__ENABLE_FEDERATED_AVATAR=true
      - GITEA__openid__ENABLE_OPENID_SIGNIN=false
      - GITEA__openid__ENABLE_OPENID_SIGNUP=false
      - GITEA__cache__ADAPTER=redis
      - GITEA__cache__HOST=network=unix,addr=/var/run/redis/redis-server.sock,db=0,pool_size=100,idle_timeout=180
      - GITEA__session__PROVIDER=redis
      - GITEA__session__PROVIDER_CONFIG=network=unix,addr=/var/run/redis/redis-server.sock,db=0,pool_size=100,idle_timeout=180
      - GITEA__log__MODE=file
#      - GITEA__log__LEVEL=Error
      - GITEA__log__LEVEL=info
      - GITEA__log__LOG_ROTATE=false
    restart: unless-stopped
    volumes:
      - ${WORKINGDIR}/docker/gitea:/data
      # Workaround
      - ${WORKINGDIR}/docker/gitea/gitea/conf/app.ini:/etc/gitea/app.ini
      # Map Logging file to the container
      - /var/log/gitea/gitea.log:/data/gitea/log/gitea.log
      # /data/git/repositories
      # /data/git/lfs
      # /data/gitea/log
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      # Access MYSQL on host
      - /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock
      # Access Redis on host
      - /var/run/redis/redis-server.sock:/var/run/redis/redis-server.sock
    labels:
      - traefik.enable=true
      - traefik.http.routers.git.entrypoints=http
      - traefik.http.services.git.loadbalancer.server.port=3000
      - traefik.docker.network=traefik_proxy
      - traefik.http.routers.git.rule=PathPrefix(`/`)

Database

MySQL

Originally created by @GAS85 on GitHub (Jul 7, 2022). ### Description Deploy gitea with docker and mounted local storage. Do commit via WebUI and see an error. Check logs and see an error, as workaround add volume to the docker - `${WORKINGDIR}/docker/gitea/gitea/conf/app.ini:/etc/gitea/app.ini` --> This basically remap existing docker managed `app.ini` to the `/etc/gitea/app.ini` in Container. Expectation: Existing `app.ini` in container under `/data/gitea/config/app.ini` should be taken into account. ### Gitea Version 1.16.8 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://sitnikov.ga/pastebin/z5IECRQ-ag3itJLXo6pfb ### Screenshots ![grafik](https://user-images.githubusercontent.com/6813635/177716212-ea1f3eeb-d56d-48ec-b32c-ae3fcb90f1f9.png) ### Git Version 2.30.3 ### Operating System Ubuntu 20.04 ### How are you running Gitea? Via docker-compose. Line `- ${WORKINGDIR}/docker/gitea/gitea/conf/app.ini:/etc/gitea/app.ini` been add to make it run. ```yaml version: "3.6" services: gitea: image: gitea/gitea:1.16 container_name: gitea environment: - USER_UID=${PUID} - USER_GID=${PGID} # https://docs.gitea.io/en-us/config-cheat-sheet - GITEA__RUN_MODE=prod - GITEA__server__PROTOCOL=http - GITEA__server__DOMAIN=***someValue*** - GITEA__server__ROOT_URL=https://***someValue***/ - GITEA__server__DISABLE_SSH=true - GITEA__server__OFFLINE_MODE=false - GITEA__server__LFS_START_SERVER=true - GITEA__server__LFS_JWT_SECRET=***someValue*** - GITEA__oauth2__JWT_SECRET=***someValue*** - GITEA__security__INTERNAL_TOKEN=***someValue*** - GITEA__security__INSTALL_LOCK=true - GITEA__security__SECRET_KEY=***someValue*** - GITEA__database__DB_TYPE=mysql - GITEA__database__HOST=/var/run/mysqld/mysqld.sock - GITEA__database__NAME=***someValue*** - GITEA__database__USER=***someValue*** - GITEA__database__PASSWD=***someValue*** - GITEA__database__SSL_MODE=disable - GITEA__database__LOG_SQL=false - GITEA__database__CHARSET=utf8 - GITEA__service__REGISTER_EMAIL_CONFIRM=false - GITEA__service__ENABLE_NOTIFY_MAIL=false - GITEA__service__DISABLE_REGISTRATION=true - GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION=false - GITEA__service__ENABLE_CAPTCHA=false - GITEA__service__REQUIRE_SIGNIN_VIEW=false - GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE=false - GITEA__service__DEFAULT_ALLOW_CREATE_ORGANIZATION=true - GITEA__service__DEFAULT_ENABLE_TIMETRACKING=true - GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE=true - GITEA__mailer__ENABLED=true - GITEA__mailer__HOST=***someValue*** - GITEA__mailer__FROM=***someValue*** - GITEA__mailer__USER=***someValue*** - GITEA__mailer__PASSWD=***someValue*** - GITEA__picture__DISABLE_GRAVATAR=true - GITEA__picture__ENABLE_FEDERATED_AVATAR=true - GITEA__openid__ENABLE_OPENID_SIGNIN=false - GITEA__openid__ENABLE_OPENID_SIGNUP=false - GITEA__cache__ADAPTER=redis - GITEA__cache__HOST=network=unix,addr=/var/run/redis/redis-server.sock,db=0,pool_size=100,idle_timeout=180 - GITEA__session__PROVIDER=redis - GITEA__session__PROVIDER_CONFIG=network=unix,addr=/var/run/redis/redis-server.sock,db=0,pool_size=100,idle_timeout=180 - GITEA__log__MODE=file # - GITEA__log__LEVEL=Error - GITEA__log__LEVEL=info - GITEA__log__LOG_ROTATE=false restart: unless-stopped volumes: - ${WORKINGDIR}/docker/gitea:/data # Workaround - ${WORKINGDIR}/docker/gitea/gitea/conf/app.ini:/etc/gitea/app.ini # Map Logging file to the container - /var/log/gitea/gitea.log:/data/gitea/log/gitea.log # /data/git/repositories # /data/git/lfs # /data/gitea/log - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro # Access MYSQL on host - /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock # Access Redis on host - /var/run/redis/redis-server.sock:/var/run/redis/redis-server.sock labels: - traefik.enable=true - traefik.http.routers.git.entrypoints=http - traefik.http.services.git.loadbalancer.server.port=3000 - traefik.docker.network=traefik_proxy - traefik.http.routers.git.rule=PathPrefix(`/`) ``` ### Database MySQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 08:31:55 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jul 14, 2022):

It seems that the git hooks in your Gitea repositories are out of sync. Please re-generate these git hooks in admin panel

Normally you do not need the /etc/gitea/app.ini.

@wxiaoguang commented on GitHub (Jul 14, 2022): It seems that the git hooks in your Gitea repositories are out of sync. Please re-generate these git hooks in admin panel Normally you do not need the `/etc/gitea/app.ini`.
Author
Owner

@GAS85 commented on GitHub (Jul 14, 2022):

This solved the issue! Thanks!

@GAS85 commented on GitHub (Jul 14, 2022): This solved the issue! Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9191