You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i recently discovered that my gogs instance was targeted by some automated spammers. They created hundreds of users with random names which in turn created repositories with spam titles in order to promote casinos and other stuff. Not a big deal, i was lucky since there was no real harm. :)
But that's why i decided to turn of the registration and only allow user creation via admin account. Easy! Just change the app.ini i was thinking.
But now im confused. The provided container image (from docker hub) is storing the gogs config at /data/gogs/conf/app.ini which seems to be created by the install wizard after the first run. So i could simply bind-mount my own app.ini from the host and be done.
But the official documentation regarding configuration states, that i should not bother with app.ini, instead use the custom/conf/app.ini instead. Which indeed i would like. Because this way i would get defaults from /data/gogs/conf/app.ini and could change single values easily in my custom app.ini.
But no matter where i create a custom app.ini (/data/custom/conf/app.ini, /app/gogs/custom/conf/app.ini, /data/gogs/custom/conf/app.ini) my custom config is not respected. The documentation here is not helpfull, since it always only references the relative path (i'm assuming relative to the location of the executable, which then would be /app/gogs/custom/conf/app.ini).
Anybody got an idea how this should be done in a container setup? Simply over-mounting the app.ini feels a bit dirty, since i have to manage way more config parameters than i actually care. And the documentation says, i should not do it. But after fiddling around it seems to be the only working way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
i recently discovered that my gogs instance was targeted by some automated spammers. They created hundreds of users with random names which in turn created repositories with spam titles in order to promote casinos and other stuff. Not a big deal, i was lucky since there was no real harm. :)
But that's why i decided to turn of the registration and only allow user creation via admin account. Easy! Just change the
app.ini
i was thinking.But now im confused. The provided container image (from docker hub) is storing the gogs config at
/data/gogs/conf/app.ini
which seems to be created by the install wizard after the first run. So i could simply bind-mount my ownapp.ini
from the host and be done.But the official documentation regarding configuration states, that i should not bother with
app.ini
, instead use thecustom/conf/app.ini
instead. Which indeed i would like. Because this way i would get defaults from/data/gogs/conf/app.ini
and could change single values easily in my customapp.ini
.But no matter where i create a custom
app.ini
(/data/custom/conf/app.ini
,/app/gogs/custom/conf/app.ini
,/data/gogs/custom/conf/app.ini
) my custom config is not respected. The documentation here is not helpfull, since it always only references the relative path (i'm assuming relative to the location of the executable, which then would be/app/gogs/custom/conf/app.ini
).Anybody got an idea how this should be done in a container setup? Simply over-mounting the
app.ini
feels a bit dirty, since i have to manage way more config parameters than i actually care. And the documentation says, i should not do it. But after fiddling around it seems to be the only working way?Beta Was this translation helpful? Give feedback.
All reactions