File tree 5 files changed +42
-2
lines changed
5 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ RUN apk --no-cache add \
13
13
s6 \
14
14
curl \
15
15
openssh \
16
+ gettext \
16
17
tzdata
17
18
RUN addgroup \
18
19
-S -g 1000 \
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ RUN apk --no-cache add \
12
12
s6 \
13
13
curl \
14
14
openssh \
15
+ gettext \
15
16
tzdata
16
17
RUN addgroup \
17
18
-S -g 1000 \
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ RUN apk --no-cache add \
13
13
s6 \
14
14
curl \
15
15
openssh \
16
+ gettext \
16
17
tzdata
17
18
RUN addgroup \
18
19
-S -g 1000 \
Original file line number Diff line number Diff line change 12
12
13
13
if [ ! -f /data/gitea/conf/app.ini ]; then
14
14
mkdir -p /data/gitea/conf
15
- cp /etc/templates/app.ini /data/gitea/conf/app.ini
15
+
16
+ # Set INSTALL_LOCK to true only if SECRET_KEY is not empty and
17
+ # INSTALL_LOCK is empty
18
+ if [ -n " $SECRET_KEY " ] && [ -z " $INSTALL_LOCK " ]; then
19
+ INSTALL_LOCK=true
20
+ fi
21
+
22
+ # Substitude the environment variables in the template
23
+ APP_NAME=${APP_NAME:- " Gitea: Git with a cup of tea" } \
24
+ APP_MODE=${APP_MODE:- " dev" } \
25
+ SSH_DOMAIN=${SSH_DOMAIN:- " localhost" } \
26
+ HTTP_PORT=${HTTP_PORT:- " 3000" } \
27
+ ROOT_URL=${ROOT_URL:- " " } \
28
+ DISABLE_SSH=${DISABLE_SSH:- " false" } \
29
+ SSH_PORT=${SSH_PORT:- " 22" } \
30
+ DB_TYPE=${DB_TYPE:- " sqlite3" } \
31
+ DB_HOST=${DB_HOST:- " localhost:3306" } \
32
+ DB_NAME=${DB_NAME:- " gitea" } \
33
+ DB_USER=${DB_USER:- " root" } \
34
+ DB_PASSWD=${DB_PASSWD:- " " } \
35
+ INSTALL_LOCK=${INSTALL_LOCK:- " false" } \
36
+ SECRET_KEY=${SECRET_KEY:- " " } \
37
+ envsubst < /etc/templates/app.ini > /data/gitea/conf/app.ini
16
38
fi
17
39
18
40
chown -R git:git /data/gitea /app/gitea /data/git
Original file line number Diff line number Diff line change 1
1
[repository]
2
+ APP_NAME = $APP_NAME
3
+ APP_MODE = $APP_MODE
2
4
ROOT = /data/git/repositories
3
5
4
6
[repository.upload]
5
7
TEMP_PATH = /data/gitea/uploads
6
8
7
9
[server]
8
10
APP_DATA_PATH = /data/gitea
11
+ SSH_DOMAIN = $SSH_DOMAIN
12
+ HTTP_PORT = $HTTP_PORT
13
+ ROOT_URL = $ROOT_URL
14
+ DISABLE_SSH = $DISABLE_SSH
15
+ SSH_PORT = $SSH_PORT
9
16
10
17
[database]
11
- DB_TYPE = sqlite3
12
18
PATH = /data/gitea/gitea.db
19
+ DB_TYPE = $DB_TYPE
20
+ HOST = $DB_HOST
21
+ NAME = $DB_NAME
22
+ USER = $DB_USER
23
+ PASSWD = $DB_PASSWD
13
24
14
25
[session]
15
26
PROVIDER_CONFIG = /data/gitea/sessions
@@ -22,3 +33,7 @@ PATH = /data/gitea/attachments
22
33
23
34
[log]
24
35
ROOT_PATH = /data/gitea/log
36
+
37
+ [security]
38
+ INSTALL_LOCK = $INSTALL_LOCK
39
+ SECRET_KEY = $SECRET_KEY
You can’t perform that action at this time.
0 commit comments