mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	feat: include installation method in data to cw hub (#2831)
This commit is contained in:
		
							
								
								
									
										4
									
								
								app.json
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								app.json
									
									
									
									
									
								
							| @@ -28,6 +28,10 @@ | ||||
|     "FRONTEND_URL": { | ||||
|       "description": "Public root URL of the Chatwoot installation. This will be used in the emails.", | ||||
|       "value": "https://CHANGE.herokuapp.com" | ||||
|     }, | ||||
|     "INSTALLATION_ENV": { | ||||
|       "description": "Installation method used for Chatwoot.", | ||||
|       "value": "heroku" | ||||
|     } | ||||
|   }, | ||||
|   "formation": { | ||||
|   | ||||
| @@ -63,6 +63,7 @@ sed -i -e '/POSTGRES_HOST/ s/=.*/=localhost/' .env | ||||
| sed -i -e '/POSTGRES_USERNAME/ s/=.*/=chatwoot/' .env | ||||
| sed -i -e "/POSTGRES_PASSWORD/ s/=.*/=$pg_pass/" .env | ||||
| sed -i -e '/RAILS_ENV/ s/=.*/=$RAILS_ENV/' .env | ||||
| echo -en "\nINSTALLATION_ENV=LINUX_SCRIPT" >> ".env" | ||||
|  | ||||
| RAILS_ENV=production bundle exec rake db:create | ||||
| RAILS_ENV=production bundle exec rake db:reset | ||||
|   | ||||
| @@ -70,6 +70,7 @@ sed -i -e '/POSTGRES_HOST/ s/=.*/=localhost/' .env | ||||
| sed -i -e '/POSTGRES_USERNAME/ s/=.*/=chatwoot/' .env | ||||
| sed -i -e "/POSTGRES_PASSWORD/ s/=.*/=$pg_pass/" .env | ||||
| sed -i -e '/RAILS_ENV/ s/=.*/=$RAILS_ENV/' .env | ||||
| echo -en "\nINSTALLATION_ENV=LINUX_SCRIPT" >> ".env" | ||||
|  | ||||
| RAILS_ENV=production bundle exec rake db:create | ||||
| RAILS_ENV=production bundle exec rake db:reset | ||||
|   | ||||
| @@ -15,6 +15,7 @@ services: | ||||
|     environment: | ||||
|       - NODE_ENV=production | ||||
|       - RAILS_ENV=production | ||||
|       - INSTALLATION_ENV=docker | ||||
|     entrypoint: docker/entrypoints/rails.sh | ||||
|     command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0'] | ||||
|  | ||||
| @@ -26,6 +27,7 @@ services: | ||||
|     environment: | ||||
|       - NODE_ENV=production | ||||
|       - RAILS_ENV=production | ||||
|       - INSTALLATION_ENV=docker | ||||
|     command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml'] | ||||
|  | ||||
|   postgres: | ||||
|   | ||||
| @@ -14,7 +14,8 @@ class ChatwootHub | ||||
|     { | ||||
|       installation_identifier: installation_identifier, | ||||
|       installation_version: Chatwoot.config[:version], | ||||
|       installation_host: URI.parse(ENV.fetch('FRONTEND_URL', '')).host | ||||
|       installation_host: URI.parse(ENV.fetch('FRONTEND_URL', '')).host, | ||||
|       installation_env: ENV.fetch('INSTALLATION_ENV', '') | ||||
|     } | ||||
|   end | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Vishnu Narayanan
					Vishnu Narayanan