gogs: Docker: html/template: "home" is undefined
- Gogs version (or commit ref): 0.11.34.1122 (image downloaded from Docker Hub)
- Git version:
- Operating system: CoreOS Stable 1576.5.0
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gogs.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist (usually found in
log/gogs.log
):
Description
First run of the container image (stable, unmodified from Docker Hub) over an existing installation of Gogs (/data volume already containing more than 16000 files) makes some URLs unusable.
Error shown in browser is: html/template: "home" is undefined
. When logged in, the dashboard works but some other URLs with templates like org/create or admin/dashboard fail with the same error.
Opening a shell into the running container and killing the gogs PID makes Gogs to restart fully functional. But restarting the container from scratch reproduces the problem.
I’ve noticed that removing the line chown -R git:git /data /app/gogs ~git/
from /app/gogs/docker/s6/gogs/setup makes the container fully functional in all cases. The Dockerfile used to create the functional container is:
FROM gogs/gogs:0.11.34 RUN sed -i ‘s/^chown/# chown/g’ /app/gogs/docker/s6/gogs/setup
…
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 14
- Comments: 25 (10 by maintainers)
Commits related to this issue
- docker: remove chown the git repos on startup (refs #4996). (#5390) — committed to gogs/gogs by rossigee 6 years ago
- Revert "docker: remove chown the git repos on startup (refs #4996). (#5390)" This reverts commit 068e6ce2c995445f0ce1c10ee11816600b12a5fd. — committed to gogs/gogs by unknwon 6 years ago
My experience is with CoreOS hosts.
Yep, @Unknwon - my bad. I just found that patch and realised I was using ‘IfNotPresent’ (i.e. not the latest image) on my setup. Sorry about that.
PR submitted to remove the rogue ‘chown’ command. For the impatient, you can pull the
rossigee/gogs
container in the meantime.Still an issue. Can we log/debug this somehow?
Have the same issue. Also, the first container log lines are: