Can not override default logo #5554

Closed
opened 2025-11-02 06:28:45 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @v-byte-cpu on GitHub (Jun 15, 2020).

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

Description

The issue https://github.com/go-gitea/gitea/issues/758 is reproduced again. I can serve aditional content, but cannot override Gitea content.

Originally created by @v-byte-cpu on GitHub (Jun 15, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): - Git version: - Operating system: use docker image gitea/gitea:1 - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant ## Description The issue https://github.com/go-gitea/gitea/issues/758 is reproduced again. I can serve aditional content, but cannot override Gitea content.
GiteaMirror added the type/questionissue/stale labels 2025-11-02 06:28:45 -06:00
Author
Owner

@jolheiser commented on GitHub (Jun 15, 2020):

Did you follow the docs for docker?

Make sure the files are in the right place and you restart the instance after adding new content.

@jolheiser commented on GitHub (Jun 15, 2020): Did you follow the [docs for docker](https://docs.gitea.io/en-us/install-with-docker/)? Make sure the files are in the right place and you restart the instance after adding new content.
Author
Owner

@v-byte-cpu commented on GitHub (Jun 15, 2020):

@jolheiser, yes, I exactly followed this guide

@v-byte-cpu commented on GitHub (Jun 15, 2020): @jolheiser, yes, I exactly followed this guide
Author
Owner

@jolheiser commented on GitHub (Jun 15, 2020):

Forgot to ask before, specifically did you see the customization part?

Unfortunately I don't currently have an instance running in Docker to check, but the code for custom public files is the same and I am able to change it on my binary-install instance.
My guess is an incorrect path somewhere. 🙁

Can you give me the path where you put the file and perhaps the docker compose? Scrubbed as necessary.

@jolheiser commented on GitHub (Jun 15, 2020): Forgot to ask before, specifically did you see the [customization](https://docs.gitea.io/en-us/install-with-docker/#customization) part? Unfortunately I don't currently have an instance running in Docker to check, but the code for custom public files is the same and I am able to change it on my binary-install instance. My guess is an incorrect path somewhere. 🙁 Can you give me the path where you put the file and perhaps the docker compose? Scrubbed as necessary.
Author
Owner

@v-byte-cpu commented on GitHub (Jun 15, 2020):

Yes, sure

docker-compose.yml:

version: '3.7'
services:
  gitea:
    image: gitea/gitea:1
    environment:
      - USER_UID=1000
      - USER_GID=1000
    networks:
      - default
      - internal_net
    volumes:
      - ./data/gitea:/data
      - ./app.ini:/data/gitea/conf/app.ini
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3081:3000"
      - "3023:22"
    depends_on:
      - postgresql

  postgresql:
    image: postgres:12-alpine
    environment:
      POSTGRES_USER: gitea
      POSTGRES_PASSWORD: gitea
      POSTGRES_DB: some_pass
      POSTGRES_INITDB_ARGS: '--lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8 --auth-host=scram-sha-256'
      POSTGRES_HOST_AUTH_METHOD: scram-sha-256
    networks:
      - internal_net
    volumes:
      - ./data/postgres:/var/lib/postgresql/data

networks:
  internal_net:
    internal: true

app.ini:

APP_NAME = Gitea
RUN_MODE = prod
RUN_USER = git

[database]
DB_TYPE  = postgres
HOST     = postgresql:5432
NAME     = gitea
USER     = gitea
PASSWD   = some_pass

[security]
PASSWORD_HASH_ALGO = argon2
INSTALL_LOCK       = true

[server]
OFFLINE_MODE     = true
DISABLE_GRAVATAR = true
LFS_START_SERVER = true
LFS_CONTENT_PATH = /data/gitea/lfs
HTTP_PORT        = 3000
SSH_PORT         = 22
SSH_DOMAIN       = localhost

[repository]
DISABLE_HTTP_GIT = true

[service]
DISABLE_REGISTRATION              = true
REQUIRE_SIGNIN_VIEW               = true
REGISTER_EMAIL_CONFIRM            = false
DEFAULT_KEEP_EMAIL_PRIVATE        = true

[picture]
DISABLE_GRAVATAR        = true
ENABLE_FEDERATED_AVATAR = false

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[log]
MODE  = console
LEVEL = info

[session]
PROVIDER = memory

In my case, I put files on host machine to ./data/gitea/gitea/public/img/ folder i.e. it maps to /data/gitea/public/img/ folder inside gitea container

@v-byte-cpu commented on GitHub (Jun 15, 2020): Yes, sure docker-compose.yml: ``` version: '3.7' services: gitea: image: gitea/gitea:1 environment: - USER_UID=1000 - USER_GID=1000 networks: - default - internal_net volumes: - ./data/gitea:/data - ./app.ini:/data/gitea/conf/app.ini - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3081:3000" - "3023:22" depends_on: - postgresql postgresql: image: postgres:12-alpine environment: POSTGRES_USER: gitea POSTGRES_PASSWORD: gitea POSTGRES_DB: some_pass POSTGRES_INITDB_ARGS: '--lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8 --auth-host=scram-sha-256' POSTGRES_HOST_AUTH_METHOD: scram-sha-256 networks: - internal_net volumes: - ./data/postgres:/var/lib/postgresql/data networks: internal_net: internal: true ``` app.ini: ``` APP_NAME = Gitea RUN_MODE = prod RUN_USER = git [database] DB_TYPE = postgres HOST = postgresql:5432 NAME = gitea USER = gitea PASSWD = some_pass [security] PASSWORD_HASH_ALGO = argon2 INSTALL_LOCK = true [server] OFFLINE_MODE = true DISABLE_GRAVATAR = true LFS_START_SERVER = true LFS_CONTENT_PATH = /data/gitea/lfs HTTP_PORT = 3000 SSH_PORT = 22 SSH_DOMAIN = localhost [repository] DISABLE_HTTP_GIT = true [service] DISABLE_REGISTRATION = true REQUIRE_SIGNIN_VIEW = true REGISTER_EMAIL_CONFIRM = false DEFAULT_KEEP_EMAIL_PRIVATE = true [picture] DISABLE_GRAVATAR = true ENABLE_FEDERATED_AVATAR = false [openid] ENABLE_OPENID_SIGNIN = false ENABLE_OPENID_SIGNUP = false [log] MODE = console LEVEL = info [session] PROVIDER = memory ``` In my case, I put files on host machine to `./data/gitea/gitea/public/img/` folder i.e. it maps to `/data/gitea/public/img/` folder inside gitea container
Author
Owner

@v-byte-cpu commented on GitHub (Jun 15, 2020):

Seems like browser caching problem. Tested in chrome. Gitea sets Expires header with + 6 hours:

curl -i http://localhost:3081/img/gitea-lg.png
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 33872
Content-Type: image/png
Etag: 6JGQZ2l0ZWEtbGcucG5nU2F0LCAzMCBNYXkgMjAyMCAyMDo1ODowMiBHTVQ=
Expires: Tue, 16 Jun 2020 02:09:59 GMT
Last-Modified: Sat, 30 May 2020 20:58:02 GMT
Date: Mon, 15 Jun 2020 20:09:59 GMT
...

Is it intended behavior ?

@v-byte-cpu commented on GitHub (Jun 15, 2020): Seems like browser caching problem. Tested in chrome. Gitea sets `Expires` header with + 6 hours: ``` curl -i http://localhost:3081/img/gitea-lg.png HTTP/1.1 200 OK Accept-Ranges: bytes Content-Length: 33872 Content-Type: image/png Etag: 6JGQZ2l0ZWEtbGcucG5nU2F0LCAzMCBNYXkgMjAyMCAyMDo1ODowMiBHTVQ= Expires: Tue, 16 Jun 2020 02:09:59 GMT Last-Modified: Sat, 30 May 2020 20:58:02 GMT Date: Mon, 15 Jun 2020 20:09:59 GMT ... ``` Is it intended behavior ?
Author
Owner

@CMiksche commented on GitHub (Jun 19, 2020):

Do the files have the correct gitea user and access rights?

I had the same problem because the linux user of the files was set to "root", after changing to my gitea user (with chown) it worked.

@CMiksche commented on GitHub (Jun 19, 2020): Do the files have the correct gitea user and access rights? I had the same problem because the linux user of the files was set to "root", after changing to my gitea user (with chown) it worked.
Author
Owner

@stale[bot] commented on GitHub (Aug 19, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 19, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5554