Can not set up custom assets for Gitea customization #11937

Closed
opened 2025-11-02 09:52:18 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @fozak on GitHub (Oct 31, 2023).

Description

I can not set up customization files described here that should be placed in /data/gitea directory
https://docs.gitea.com/next/installation/install-with-docker#::text=Customization%20files%20described,app.ini%20after
in Docker set up.
My assumption was that I can just place them into like $GITEA_CUSTOM/public/assets/ and $GITEA_CUSTOM/templates/custom etc. inside the gitea container, but there are no such folders inside container and no direct access at /var/lib/docker/volumes/gitea_gitea/_data as described in https://docs.gitea.com/next/installation/install-with-docker#:
:text=Customization%20files%20described,app.ini%20after

docker container:
/data/gitea # ls
attachments conf indexers log queues repo-avatars tmp

Server configuration
Website/admin/config : Gitea Version 1.20.5 built with GNU Make 4.4.1, go1.20.8 : bindata, timetzdata, sqlite, sqlite_unlock_notify Configuration File Path /data/gitea/conf/app.ini Local Mode Disable Router Log Run As Username git Run Mode Prod Git Version 2.40.1, Wire Protocol Version 2 Enabled App Data Path /data/gitea Repository Root Path /data/git/repositories Custom File Root Path /data/gitea Log Path /data/gitea/log Script Type bash Reverse Authentication User X-WEBAUTH-USER

Gitea Version

1.20.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

Git Version 2.40.1

Operating System

ubuntu

How are you running Gitea?

docker-compose.yml
version: "2"

services:
server:
image: gitea/gitea:latest
environment:
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea
restart: always
volumes:
- ./data:/var/lib/gitea
- ./config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "2222:2222"
depends_on:
- db

db:
image: postgres:14
restart: always
environment:
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=****
restart: always
volumes:
- ./data:/var/lib/gitea
- ./config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "2222:2222"
depends_on:
- db

db:
image: postgres:14
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
volumes:
- ./postgres:/var/lib/postgresql/data

Database

PostgreSQL

Originally created by @fozak on GitHub (Oct 31, 2023). ### Description I can not set up customization files described [here](https://docs.gitea.com/next/administration/customizing-gitea) that should be placed in /data/gitea directory https://docs.gitea.com/next/installation/install-with-docker#:~:text=Customization%20files%20described,app.ini%20after in Docker set up. My assumption was that I can just place them into like $GITEA_CUSTOM/public/assets/ and $GITEA_CUSTOM/templates/custom etc. inside the gitea container, but there are no such folders inside container and no direct access at /var/lib/docker/volumes/gitea_gitea/_data as described in https://docs.gitea.com/next/installation/install-with-docker#:~:text=Customization%20files%20described,app.ini%20after docker container: /data/gitea # ls attachments conf indexers log queues repo-avatars tmp Server configuration `Website/admin/config : Gitea Version 1.20.5 built with GNU Make 4.4.1, go1.20.8 : bindata, timetzdata, sqlite, sqlite_unlock_notify Configuration File Path /data/gitea/conf/app.ini Local Mode Disable Router Log Run As Username git Run Mode Prod Git Version 2.40.1, Wire Protocol Version 2 Enabled App Data Path /data/gitea Repository Root Path /data/git/repositories Custom File Root Path /data/gitea Log Path /data/gitea/log Script Type bash Reverse Authentication User X-WEBAUTH-USER ` ### Gitea Version 1.20.5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version Git Version 2.40.1 ### Operating System ubuntu ### How are you running Gitea? docker-compose.yml version: "2" services: server: image: gitea/gitea:latest environment: - GITEA__database__DB_TYPE=postgres - GITEA__database__HOST=db:5432 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=gitea restart: always volumes: - ./data:/var/lib/gitea - ./config:/etc/gitea - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "2222:2222" depends_on: - db db: image: postgres:14 restart: always environment: - GITEA__database__DB_TYPE=postgres - GITEA__database__HOST=db:5432 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=**** restart: always volumes: - ./data:/var/lib/gitea - ./config:/etc/gitea - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "2222:2222" depends_on: - db db: image: postgres:14 restart: always environment: - POSTGRES_USER=gitea - POSTGRES_PASSWORD=gitea - POSTGRES_DB=gitea volumes: - ./postgres:/var/lib/postgresql/data ### Database PostgreSQL
Author
Owner

@lng2020 commented on GitHub (Oct 31, 2023):

./data:/var/lib/gitea

Is your volume mounting right?

@lng2020 commented on GitHub (Oct 31, 2023): > ./data:/var/lib/gitea Is your volume mounting right?
Author
Owner

@wxiaoguang commented on GitHub (Oct 31, 2023):

inside the gitea container, but there are no such folders inside container

You need to create the directory manually.

And the paths are different in 1.20 ($GITEA_CUSTOM/public/) and 1.21 ($GITEA_CUSTOM/public/assets/), see the document for more information.

@wxiaoguang commented on GitHub (Oct 31, 2023): > inside the gitea container, but there are no such folders inside container You need to create the directory manually. And the paths are different in 1.20 (`$GITEA_CUSTOM/public/`) and 1.21 (`$GITEA_CUSTOM/public/assets/`), see the document for more information. * For 1.20: https://docs.gitea.com/1.20/administration/customizing-gitea * For 1.21: https://docs.gitea.com/1.21/administration/customizing-gitea
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11937