use docker,but cannot Customizing Gitea pages #2270

Closed
opened 2025-11-02 04:30:32 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @hanfeicode on GitHub (Aug 30, 2018).

use docker,but cannot Customizing Gitea pages .
cannot find any file about gitea page like welcome

/data/gitea # find / -name "gitea"
/etc/profile.d/gitea.sh
/etc/s6/gitea
/usr/local/bin/gitea
/app/gitea
/app/gitea/gitea
/data/gitea
/data/gitea/log/gitea.log.2018-08-27.001
/data/gitea/log/gitea.log
/data/gitea/gitea.db

/data/gitea # cat /etc/profile.d/gitea.sh
#!/bin/bash
export GITEA_CUSTOM=/data/gitea

/data/gitea # ls -l
total 956
drwxr-xr-x 2 git git 4096 Aug 30 10:13 avatars
drwxr-xr-x 2 git git 4096 Aug 30 10:30 conf
-rw-r--r-- 1 git git 950272 Aug 30 10:13 gitea.db
drwx------ 3 git git 4096 Aug 30 10:21 indexers
drwxr-xr-x 3 git git 4096 Aug 30 00:04 log
drwxr-xr-x 18 git git 4096 Jul 25 05:05 sessions
drwxr-xr-x 3 git git 4096 Jul 25 03:38 uploads

Originally created by @hanfeicode on GitHub (Aug 30, 2018). use docker,but cannot Customizing Gitea pages . cannot find any file about gitea page like welcome /data/gitea # find / -name "*gitea*" /etc/profile.d/gitea.sh /etc/s6/gitea /usr/local/bin/gitea /app/gitea /app/gitea/gitea /data/gitea /data/gitea/log/gitea.log.2018-08-27.001 /data/gitea/log/gitea.log /data/gitea/gitea.db /data/gitea # cat /etc/profile.d/gitea.sh #!/bin/bash export GITEA_CUSTOM=/data/gitea /data/gitea # ls -l total 956 drwxr-xr-x 2 git git 4096 Aug 30 10:13 avatars drwxr-xr-x 2 git git 4096 Aug 30 10:30 conf -rw-r--r-- 1 git git 950272 Aug 30 10:13 gitea.db drwx------ 3 git git 4096 Aug 30 10:21 indexers drwxr-xr-x 3 git git 4096 Aug 30 00:04 log drwxr-xr-x 18 git git 4096 Jul 25 05:05 sessions drwxr-xr-x 3 git git 4096 Jul 25 03:38 uploads
GiteaMirror added the type/question label 2025-11-02 04:30:32 -06:00
Author
Owner

@lafriks commented on GitHub (Aug 30, 2018):

See https://docs.gitea.io/en-us/customizing-gitea/

@lafriks commented on GitHub (Aug 30, 2018): See https://docs.gitea.io/en-us/customizing-gitea/
Author
Owner

@Castleeee commented on GitHub (Jul 26, 2019):

I also can't find it , in docker you can never find the CustomPath

@Castleeee commented on GitHub (Jul 26, 2019): I also can't find it , in docker you can never find the CustomPath
Author
Owner

@zeripath commented on GitHub (Jul 26, 2019):

When you run gitea web the initial lines of the log file will list the important configuration places.

E.g.:

❯ docker run gitea/gitea:latest                                                                           [08:47:12]
Generating /data/ssh/ssh_host_ed25519_key...
Generating /data/ssh/ssh_host_rsa_key...
Generating /data/ssh/ssh_host_dsa_key...
Generating /data/ssh/ssh_host_ecdsa_key...
Server listening on :: port 22.
Server listening on 0.0.0.0 port 22.
2019/07/26 07:47:16 ...dules/setting/git.go:83:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled
2019/07/26 07:47:16 routers/init.go:70:GlobalInit() [T] AppPath: /app/gitea/gitea
2019/07/26 07:47:16 routers/init.go:71:GlobalInit() [T] AppWorkPath: /app/gitea
2019/07/26 07:47:16 routers/init.go:72:GlobalInit() [T] Custom path: /data/gitea
2019/07/26 07:47:16 routers/init.go:73:GlobalInit() [T] Log path: /data/gitea/log
...

Or on 1.8.3:

 ❯ docker run gitea/gitea:1.8.3                                                                            [08:47:51]
Unable to find image 'gitea/gitea:1.8.3' locally
1.8.3: Pulling from gitea/gitea
e7c96db7181b: Already exists 
495d5d982a9a: Already exists 
5fe15899a512: Already exists 
3448674ddbcd: Pull complete 
c5105adf5178: Pull complete 
2d30e4c01df3: Pull complete 
Digest: sha256:25af63fb9625051c220c2e1ecb7315dad0c6013db7b4dcc2830d046a0b5c7204
Status: Downloaded newer image for gitea/gitea:1.8.3
Generating /data/ssh/ssh_host_ed25519_key...
Jul 26 07:48:11 syslogd started: BusyBox v1.29.3
Generating /data/ssh/ssh_host_rsa_key...
Generating /data/ssh/ssh_host_dsa_key...
Generating /data/ssh/ssh_host_ecdsa_key...
Jul 26 07:48:11 sshd[19]: Server listening on :: port 22.
Jul 26 07:48:11 sshd[19]: Server listening on 0.0.0.0 port 22.
2019/07/26 07:48:11 [T] AppPath: /app/gitea/gitea
2019/07/26 07:48:11 [T] AppWorkPath: /app/gitea
2019/07/26 07:48:11 [T] Custom path: /data/gitea
2019/07/26 07:48:11 [T] Log path: /data/gitea/log
...

On 1.9+ gitea --help will tell you what it thinks the CustomPath is in the section labelled DEFAULT CONFIGURATION.

DEFAULT CONFIGURATION:
     CustomPath:  /home/andrew/go/src/code.gitea.io/gitea/custom 
     CustomConf:  /home/andrew/go/src/code.gitea.io/gitea/custom/conf/app.ini
     AppPath:     /home/andrew/go/src/code.gitea.io/gitea/gitea
     AppWorkPath: /home/andrew/go/src/code.gitea.io/gitea
@zeripath commented on GitHub (Jul 26, 2019): When you run `gitea web` the initial lines of the log file will list the important configuration places. E.g.: ``` ❯ docker run gitea/gitea:latest [08:47:12] Generating /data/ssh/ssh_host_ed25519_key... Generating /data/ssh/ssh_host_rsa_key... Generating /data/ssh/ssh_host_dsa_key... Generating /data/ssh/ssh_host_ecdsa_key... Server listening on :: port 22. Server listening on 0.0.0.0 port 22. 2019/07/26 07:47:16 ...dules/setting/git.go:83:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled 2019/07/26 07:47:16 routers/init.go:70:GlobalInit() [T] AppPath: /app/gitea/gitea 2019/07/26 07:47:16 routers/init.go:71:GlobalInit() [T] AppWorkPath: /app/gitea 2019/07/26 07:47:16 routers/init.go:72:GlobalInit() [T] Custom path: /data/gitea 2019/07/26 07:47:16 routers/init.go:73:GlobalInit() [T] Log path: /data/gitea/log ... ``` Or on 1.8.3: ``` ❯ docker run gitea/gitea:1.8.3 [08:47:51] Unable to find image 'gitea/gitea:1.8.3' locally 1.8.3: Pulling from gitea/gitea e7c96db7181b: Already exists 495d5d982a9a: Already exists 5fe15899a512: Already exists 3448674ddbcd: Pull complete c5105adf5178: Pull complete 2d30e4c01df3: Pull complete Digest: sha256:25af63fb9625051c220c2e1ecb7315dad0c6013db7b4dcc2830d046a0b5c7204 Status: Downloaded newer image for gitea/gitea:1.8.3 Generating /data/ssh/ssh_host_ed25519_key... Jul 26 07:48:11 syslogd started: BusyBox v1.29.3 Generating /data/ssh/ssh_host_rsa_key... Generating /data/ssh/ssh_host_dsa_key... Generating /data/ssh/ssh_host_ecdsa_key... Jul 26 07:48:11 sshd[19]: Server listening on :: port 22. Jul 26 07:48:11 sshd[19]: Server listening on 0.0.0.0 port 22. 2019/07/26 07:48:11 [T] AppPath: /app/gitea/gitea 2019/07/26 07:48:11 [T] AppWorkPath: /app/gitea 2019/07/26 07:48:11 [T] Custom path: /data/gitea 2019/07/26 07:48:11 [T] Log path: /data/gitea/log ... ``` On 1.9+ `gitea --help` will tell you what it thinks the CustomPath is in the section labelled DEFAULT CONFIGURATION. ``` DEFAULT CONFIGURATION: CustomPath: /home/andrew/go/src/code.gitea.io/gitea/custom CustomConf: /home/andrew/go/src/code.gitea.io/gitea/custom/conf/app.ini AppPath: /home/andrew/go/src/code.gitea.io/gitea/gitea AppWorkPath: /home/andrew/go/src/code.gitea.io/gitea ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2270