mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 02:10:05 +00:00 
			
		
		
		
	Compute POSTGRES_ALLOWED_AVG_CONNECTIONS once and propagate to app roles (gitlab, mastodon, listmonk, matrix, pretix, mobilizon, openproject, discourse). Fix docker-compose postgres command (-c flags split). Add unit tests. Minor env/locale tweaks and includes. Conversation: https://chatgpt.com/share/68b48e72-cc28-800f-9c21-270cbc17d82a
		
			
				
	
	
		
			25 lines
		
	
	
		
			870 B
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			870 B
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
| [app]
 | |
| # Interface and port where the application will run its webserver.  The default value
 | |
| # of localhost will only listen to connections from the current machine. To
 | |
| # listen on all interfaces use '0.0.0.0'. To listen on the default web address
 | |
| # port, use port 80 (this will require running with elevated permissions).
 | |
| address = "0.0.0.0:{{ container_port }}"
 | |
| 
 | |
| # Database.
 | |
| [db]
 | |
| host = "{{ database_host }}"
 | |
| port = {{ database_port }}
 | |
| user = "{{ database_username }}"
 | |
| password = "{{ database_password }}"
 | |
| 
 | |
| # Ensure that this database has been created in Postgres.
 | |
| database = "{{ database_name }}"
 | |
| 
 | |
| ssl_mode = "disable"
 | |
| max_open = {{ POSTGRES_ALLOWED_AVG_CONNECTIONS }}
 | |
| max_idle = {{ ( POSTGRES_ALLOWED_AVG_CONNECTIONS | int // 2 ) }}
 | |
| max_lifetime = "300s"
 | |
| 
 | |
| # Optional space separated Postgres DSN params. eg: "application_name=listmonk gssencmode=disable"
 | |
| params = ""
 |