Installing Docker Root less per the manual using RHEL9. Nothing changed starting it with docker compose up. And nothing works. Banner on top is "Gitea JavaScript code couldn't run correctly, please check your custom templates" #13736

Closed
opened 2025-11-02 10:51:45 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @iamtristan on GitHub (Nov 21, 2024).

Description

Installing Docker Root less per the manual using RHEL9. Nothing changed starting it with docker compose up. And nothing works. Banner on top is "Gitea JavaScript code couldn't run correctly, please check your custom templates"

This happens before and after installation.

Used the instructions here to the letter.

https://docs.gitea.com/installation/install-with-docker-rootless

Gitea Version

1.22.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

RHEL9 via Docker Compose

version: "2"

services:
server:
image: gitea/gitea:1.22.3-rootless
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"

Database

SQLite

Originally created by @iamtristan on GitHub (Nov 21, 2024). ### Description Installing Docker Root less per the manual using RHEL9. Nothing changed starting it with docker compose up. And nothing works. Banner on top is "Gitea JavaScript code couldn't run correctly, please check your custom templates" This happens before and after installation. Used the instructions here to the letter. https://docs.gitea.com/installation/install-with-docker-rootless ### Gitea Version 1.22.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? RHEL9 via Docker Compose version: "2" services: server: image: gitea/gitea:1.22.3-rootless 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" ### Database SQLite
GiteaMirror added the issue/needs-feedback label 2025-11-02 10:51:45 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Nov 22, 2024):

Gitea JavaScript code couldn't run correctly, please check your custom templates means the outputed page is corrupted.

You could also check page source code and browser's console errors.

There could also be something wrong in your reverse proxy, please make sure every step you have done you could understand, otherwise don't do it.

If there is still a problem, please show a reproducible example with all config and detailed steps.

@wxiaoguang commented on GitHub (Nov 22, 2024): `Gitea JavaScript code couldn't run correctly, please check your custom templates` means the outputed page is corrupted. You could also check page source code and browser's console errors. There could also be something wrong in your reverse proxy, please make sure every step you have done you could understand, otherwise don't do it. If there is still a problem, please show a reproducible example with all config and detailed steps.
Author
Owner

@iamtristan commented on GitHub (Nov 22, 2024):

Hello -
Found it. A severely hardened environment.

Here was the problem within NGINX

add_header Content-Security-Policy "default-src 'self'" always;

Thanks wxiaoguang for actually hinting it out :)

@iamtristan commented on GitHub (Nov 22, 2024): Hello - Found it. A severely hardened environment. # Here was the problem within NGINX add_header Content-Security-Policy "default-src 'self'" always; Thanks wxiaoguang for actually hinting it out :)
Author
Owner

@iamtristan commented on GitHub (Nov 22, 2024):

Works now with some changes...

@iamtristan commented on GitHub (Nov 22, 2024): Works now with some changes...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13736