Skip to content

custom/conf/app.ini seems not working #2173

@twang2218

Description

@twang2218
  • Gitea version (or commit ref): 1.1.2
  • Git version: 2.8.5
  • Operating system: Docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I'm going to run the gitea stack inside docker, and I followed the customize guide to config the settings, /data/gitea/custom/conf/app.ini, here is the my custom settings:

APP_NAME = Gitea: 开发团队
RUN_USER = git
RUN_MODE = prod

[ui.meta]
AUTHOR = 开发团队
DESCRIPTION = 危险勿入‼️

[server]
SSH_DOMAIN = dev.example.org
HTTP_PORT  = 80
ROOT_URL   = http://dev.example.org/
DISABLE_SSH = false
SSH_PORT = 2222

[database]
DB_TYPE = postgres
HOST = database:5432
NAME = gitea
USER = gitea
PASSWD = gitea_password
SSL_MODE = disable

[security]
INSTALL_LOCK = true

And then I use the docker-compose.yml to start the stack:

version: '3.3'

volumes:
    gitea: {}
    db: {}

configs:
    init-db-script:
        file: ./init-db.sh
    gitea-custom-ini:
        file: ./gitea.ini

services:
    gitea:
        image: gitea/gitea:1.1.2
        depends_on: [ database ]
        ports:
            - "2222:2222"
            - "3000:80"
        configs:
            - source: gitea-custom-ini
              target: /data/gitea/custom/conf/app.ini
        volumes:
            - gitea:/data

    database:
        image: postgres:9.6
        volumes:
            - db:/var/lib/postgresql/data
        configs:
            - source: init-db-script
              target: /docker-entrypoint-initdb.d/init-user-db.sh
        environment:
            POSTGRES_PASSWORD: my_db_password

However, when I started the stack by docker stack deploy -c stack.yml dev, I found my custom app.ini is not working.

First the gitea service is running at 3000 port, which is the default one. Second, when I changed the port mapping, 3000:3000 and visit localhost:3000, it redirect me to the install page, and totally ignored my custom settings.

After I followed the install page, I found all my setting have been written to /data/gitea/conf/app.ini, it seems the /data/gitea/custom/conf/app.ini is useless for custom settings.

Screenshots

If this issue involves the Web Interface, please include a screenshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/docsThis PR mainly updates/creates documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions