Ketrel
June 27, 2018, 1:54pm
1
When I run the binary for gitea, it creates the ‘data’ directory in whichever directory I was in when I ran the binary.
I cannot find any combination of variables (such as GITEA_CUSTOM and GITEA_WORK_DIR) which change this behavior.
NOT including going into the directory I want the data directory to be placed in prior to running the binary, how can I control where this is created?
Hello. All configs are contained in app.ini . And the [server]
section has parameter:
APP_DATA_PATH = data
You can read more about config file here
Ketrel
June 27, 2018, 6:15pm
3
I think you misunderstood. There is no ini file yet.
I’m talking about a first run / install.
I know how to change where it looks AFTER it’s installed.
Surely the correct procedure isn’t
Start binary
Run install
Stop binary
Move data directory
Edit ini
Start binary
I find it hard to believe there’s not a way to define this location ahead of time.
You can copy app.ini.sample and set all parameters before first run
Ketrel
June 27, 2018, 7:13pm
5
Sure, that will work, but that’s a hell of a workaround.
That suggests the whole install process is broken if it needs me to bypass the whole thing so a directory isn’t misplaced.
Ketrel:
Sure, that will work, but that’s a hell of a workaround.
That suggests the whole install process is broken if it needs me to bypass the whole thing so a directory isn’t misplaced.
I wouldn’t call that workaround. What you are trying to do can easily be setup in the first-run setup on the site, set later after the config is generated from the first setup, or the easy, preferred method how AxiFive said.
You just simply create the config directories where your Gitea executable is and put in the params you want to set inside of an app.ini before the first run.
Ketrel
July 6, 2018, 12:24pm
7
How is
Creating the file(s) in the wrong place
Killing the server
Modifying the config
Manually moving the files
Restarting the server
or
Bypassing the entire install process
Manually creating the config file which the above process would have done for you
Not considered a workaround vs
The data directory gets created where you define
If running Docker you can specify the data
directory in the container using the volumes
setting.
Ketrel
July 7, 2018, 12:43pm
9
This isn’t in regards to the docker version. This is about the binary.