mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add missing envionment vars for DB with Docker (#5007)
Current docs demonstrate how to configure a database container but don't explicitly specify that you should add additional environment variables to the Gitea container to make it use the database. This just demonstrates the changes required. Signed-off-by: Dane Elwell <dane.elwell@ukfast.co.uk>
This commit is contained in:
		@@ -105,6 +105,11 @@ services:
 | 
				
			|||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      - USER_UID=1000
 | 
					      - USER_UID=1000
 | 
				
			||||||
      - USER_GID=1000
 | 
					      - USER_GID=1000
 | 
				
			||||||
 | 
					+      - DB_TYPE=mysql
 | 
				
			||||||
 | 
					+      - DB_HOST=db:3306
 | 
				
			||||||
 | 
					+      - DB_NAME=gitea
 | 
				
			||||||
 | 
					+      - DB_USER=gitea
 | 
				
			||||||
 | 
					+      - DB_PASSWD=gitea
 | 
				
			||||||
    restart: always
 | 
					    restart: always
 | 
				
			||||||
    networks:
 | 
					    networks:
 | 
				
			||||||
      - gitea
 | 
					      - gitea
 | 
				
			||||||
@@ -148,6 +153,11 @@ services:
 | 
				
			|||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      - USER_UID=1000
 | 
					      - USER_UID=1000
 | 
				
			||||||
      - USER_GID=1000
 | 
					      - USER_GID=1000
 | 
				
			||||||
 | 
					+      - DB_TYPE=postgres
 | 
				
			||||||
 | 
					+      - DB_HOST=db:5432
 | 
				
			||||||
 | 
					+      - DB_NAME=gitea
 | 
				
			||||||
 | 
					+      - DB_USER=gitea
 | 
				
			||||||
 | 
					+      - DB_PASSWD=gitea
 | 
				
			||||||
    restart: always
 | 
					    restart: always
 | 
				
			||||||
    networks:
 | 
					    networks:
 | 
				
			||||||
      - gitea
 | 
					      - gitea
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user