mirror of
				https://git.cloudron.io/cloudron/gitea-app
				synced 2025-11-03 16:42:35 +00:00 
			
		
		
		
	Use /healthcheck to wait till gogs comes up
This commit is contained in:
		@@ -5,7 +5,7 @@
 | 
				
			|||||||
  "description": "file://DESCRIPTION.md",
 | 
					  "description": "file://DESCRIPTION.md",
 | 
				
			||||||
  "tagline": "A painless self-hosted Git Service",
 | 
					  "tagline": "A painless self-hosted Git Service",
 | 
				
			||||||
  "version": "0.1.2",
 | 
					  "version": "0.1.2",
 | 
				
			||||||
  "healthCheckPath": "/",
 | 
					  "healthCheckPath": "/healthcheck",
 | 
				
			||||||
  "httpPort": 3000,
 | 
					  "httpPort": 3000,
 | 
				
			||||||
  "addons": {
 | 
					  "addons": {
 | 
				
			||||||
    "mysql": { },
 | 
					    "mysql": { },
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								start.sh
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								start.sh
									
									
									
									
									
								
							@@ -34,7 +34,11 @@ chown cloudron:cloudron /home/cloudron/gogs/custom/conf/app.ini
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gogs &
 | 
					/usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gogs &
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sleep 10 # on first run, lets gogs finish the db setup
 | 
					# Wait for gogs to finish db setup, before we insert ldap source in db
 | 
				
			||||||
 | 
					while curl --fail http://localhost:3000/healthcheck; do
 | 
				
			||||||
 | 
					    echo "Waiting for gogs to come up"
 | 
				
			||||||
 | 
					    sleep 1
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# id, type, name, is_actived, cfg, allow_auto_register, created, updated
 | 
					# id, type, name, is_actived, cfg, allow_auto_register, created, updated
 | 
				
			||||||
mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" \
 | 
					mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" \
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user