forem / selfhost

Selfhost your Forem Community on your own infrastructure 🎉
https://www.forem.com/get-started/
GNU Affero General Public License v3.0
1.43k stars 169 forks source link

Can i add script in head tag? #68

Closed f2k2game closed 2 years ago

f2k2game commented 2 years ago

I would like to add custom script in head and body tag. Is that possible in selfhost?

And also is that any way to upload file in root folder? I would like to upload ads.txt file in root folder.

jdoss commented 2 years ago

You could mount the file in from the host inside the container or build a custom container with that added to the rails root of Forem.

f2k2game commented 2 years ago

Thank You, I am new container topics, i can't able to locate container file when i run

docker ps -a

It shows following image

traefik:2.3.0 
darthsim/imgproxy:v2      
quay.io/forem/openresty:1.17.8.2
redis:6.0.1
localhost/forem/forem:current ("bundle exec rails s…" as command)  
k8s.gcr.io/pause:3.5
localhost/forem/forem:current ("bundle exec sidekiq…" as command)
postgres:11

i have edited a file in both localhost/forem/forem:current container and restarted the forem but its doesn't make any changes in forem frontend.

jdoss commented 2 years ago

This kind of question is better off on https://forem.dev/ which is the community for helping people use Forem to run their own community. This repo's issues board are for specific issues with the automation to run your own Forem.

You most likely want to build your own container with the custom changes you want and then edit /opt/forem/version and change CONTAINER to point to your custom image. Then restart Forem.

https://github.com/forem/selfhost/blob/main/playbooks/templates/forem.yml.j2#L54