Open Cyber1000 opened 6 years ago
I've done some research and came to this solution (base is a docker gitea configuration):
!/bin/bash
echo "#File is created automatically, don't change things in here" > ./data/gitea/conf/app.ini cat ./data/gitea/conf/app.part.ini>>./data/gitea/conf/app.ini cat ./data/gitea/conf/app.pwd.ini>>./data/gitea/conf/app.ini docker-compose up -d
app.part.ini is everything except password app.pwd.ini is:
[database] PASSWD = xxxxxx
On merging, two database-sections are in the resulting file, but that doesn't matter. Solution could be better (I have to think to start this script instead of a simple docker-compose up, everytime I change something), but for my purposes it's sufficent.
Thanks, Cyber1000
Just a follow up, cause I did a cleanup to my configuration:
[database]
DB_TYPE = mysql
HOST = database
NAME = gitea
USER = $DB_USER
PASSWD = $DB_PASSWD
I didn't make everything variable (like the database), since I just wanted to mask the password/user, and some other small things. My docker-compose.yaml (just relevant parts):
environment:
- USER_UID=1000
- USER_GID=1000
- DB_USER=${DB_USER}
- DB_PASSWD=${DB_PASSWD}
volumes:
- ./data/etc/templates/app.ini:/etc/templates/app.ini
Changing title of this issue, since the other 2 points are well working.
An easy import of all local stored repos would be nice on first start (or by triggering it) either from webui or from cli (or both)
Edit :exclamation: : Changing the title, since there is just one point left, my proposal to imports of local repos can be read from starting here: https://github.com/go-gitea/gitea/issues/4474#issuecomment-583788178
[x]
):Description
Thanks, Cyber1000