Skip to content

Commit 27ac1d0

Browse files
nothubzeripath
authored andcommitted
add /etc/timezone and /etc/localtime volumes (#8911)
Passing these volumes to the container enable gitea to use hosts localtime and timezone. This is a mandatory change when using the "Setup fail2ban" Guide, but it is not described in the documentation.
1 parent be869e8 commit 27ac1d0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/content/doc/installation/with-docker.en-us.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ services:
5151
- gitea
5252
volumes:
5353
- ./gitea:/data
54+
- /etc/timezone:/etc/timezone:ro
55+
- /etc/localtime:/etc/localtime:ro
5456
ports:
5557
- "3000:3000"
5658
- "222:22"
@@ -80,6 +82,8 @@ services:
8082
- gitea
8183
volumes:
8284
- ./gitea:/data
85+
- /etc/timezone:/etc/timezone:ro
86+
- /etc/localtime:/etc/localtime:ro
8387
ports:
8488
- - "3000:3000"
8589
- - "222:22"
@@ -115,6 +119,8 @@ services:
115119
- gitea
116120
volumes:
117121
- ./gitea:/data
122+
- /etc/timezone:/etc/timezone:ro
123+
- /etc/localtime:/etc/localtime:ro
118124
ports:
119125
- "3000:3000"
120126
- "222:22"
@@ -163,6 +169,8 @@ services:
163169
- gitea
164170
volumes:
165171
- ./gitea:/data
172+
- /etc/timezone:/etc/timezone:ro
173+
- /etc/localtime:/etc/localtime:ro
166174
ports:
167175
- "3000:3000"
168176
- "222:22"
@@ -209,6 +217,8 @@ services:
209217
volumes:
210218
- - ./gitea:/data
211219
+ - gitea:/data
220+
- /etc/timezone:/etc/timezone:ro
221+
- /etc/localtime:/etc/localtime:ro
212222
ports:
213223
- "3000:3000"
214224
- "222:22"
@@ -306,6 +316,8 @@ UID/GID as the container values `USER_UID`/`USER_GID`. You should also create th
306316
- gitea
307317
volumes:
308318
- /var/lib/gitea:/data
319+
- /etc/timezone:/etc/timezone:ro
320+
- /etc/localtime:/etc/localtime:ro
309321
ports:
310322
- "3000:3000"
311323
- "127.0.0.1:2222:22"

0 commit comments

Comments
 (0)