mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 17:13:42 +01:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									be869e8881
								
							
						
					
					
						commit
						27ac1d0952
					
				@ -51,6 +51,8 @@ services:
 | 
				
			|||||||
      - gitea
 | 
					      - gitea
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - ./gitea:/data
 | 
					      - ./gitea:/data
 | 
				
			||||||
 | 
					      - /etc/timezone:/etc/timezone:ro
 | 
				
			||||||
 | 
					      - /etc/localtime:/etc/localtime:ro
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "3000:3000"
 | 
					      - "3000:3000"
 | 
				
			||||||
      - "222:22"
 | 
					      - "222:22"
 | 
				
			||||||
@ -80,6 +82,8 @@ services:
 | 
				
			|||||||
      - gitea
 | 
					      - gitea
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - ./gitea:/data
 | 
					      - ./gitea:/data
 | 
				
			||||||
 | 
					      - /etc/timezone:/etc/timezone:ro
 | 
				
			||||||
 | 
					      - /etc/localtime:/etc/localtime:ro
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
-      - "3000:3000"
 | 
					-      - "3000:3000"
 | 
				
			||||||
-      - "222:22"
 | 
					-      - "222:22"
 | 
				
			||||||
@ -115,6 +119,8 @@ services:
 | 
				
			|||||||
      - gitea
 | 
					      - gitea
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - ./gitea:/data
 | 
					      - ./gitea:/data
 | 
				
			||||||
 | 
					      - /etc/timezone:/etc/timezone:ro
 | 
				
			||||||
 | 
					      - /etc/localtime:/etc/localtime:ro
 | 
				
			||||||
     ports:
 | 
					     ports:
 | 
				
			||||||
       - "3000:3000"
 | 
					       - "3000:3000"
 | 
				
			||||||
       - "222:22"
 | 
					       - "222:22"
 | 
				
			||||||
@ -163,6 +169,8 @@ services:
 | 
				
			|||||||
      - gitea
 | 
					      - gitea
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - ./gitea:/data
 | 
					      - ./gitea:/data
 | 
				
			||||||
 | 
					      - /etc/timezone:/etc/timezone:ro
 | 
				
			||||||
 | 
					      - /etc/localtime:/etc/localtime:ro
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "3000:3000"
 | 
					      - "3000:3000"
 | 
				
			||||||
      - "222:22"
 | 
					      - "222:22"
 | 
				
			||||||
@ -209,6 +217,8 @@ services:
 | 
				
			|||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
-      - ./gitea:/data
 | 
					-      - ./gitea:/data
 | 
				
			||||||
+      - gitea:/data
 | 
					+      - gitea:/data
 | 
				
			||||||
 | 
					      - /etc/timezone:/etc/timezone:ro
 | 
				
			||||||
 | 
					      - /etc/localtime:/etc/localtime:ro
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "3000:3000"
 | 
					      - "3000:3000"
 | 
				
			||||||
      - "222:22"
 | 
					      - "222:22"
 | 
				
			||||||
@ -306,6 +316,8 @@ UID/GID as the container values `USER_UID`/`USER_GID`. You should also create th
 | 
				
			|||||||
        - gitea
 | 
					        - gitea
 | 
				
			||||||
      volumes:
 | 
					      volumes:
 | 
				
			||||||
        - /var/lib/gitea:/data
 | 
					        - /var/lib/gitea:/data
 | 
				
			||||||
 | 
					        - /etc/timezone:/etc/timezone:ro
 | 
				
			||||||
 | 
					        - /etc/localtime:/etc/localtime:ro
 | 
				
			||||||
      ports:
 | 
					      ports:
 | 
				
			||||||
        - "3000:3000"
 | 
					        - "3000:3000"
 | 
				
			||||||
        - "127.0.0.1:2222:22"
 | 
					        - "127.0.0.1:2222:22"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user