tests: generate homeserver on build
This commit is contained in:
		
					parent
					
						
							
								6633020fba
							
						
					
				
			
			
				commit
				
					
						562b29c8a2
					
				
			
		
					 2 changed files with 7 additions and 2916 deletions
				
			
		| 
						 | 
				
			
			@ -2,15 +2,16 @@
 | 
			
		|||
# "from synapse._scripts.register_new_matrix_user import request_registration"
 | 
			
		||||
FROM matrixdotorg/synapse
 | 
			
		||||
 | 
			
		||||
# This variable defaults to /data which is a volume made to keep data.
 | 
			
		||||
# The config dir defaults to /data which is a volume made to keep data.
 | 
			
		||||
# Here, we want to trash those (and avoid the permission issues) by using something else
 | 
			
		||||
ENV SYNAPSE_CONFIG_DIR=/srv
 | 
			
		||||
ENV SYNAPSE_CONFIG_DIR=/srv SYNAPSE_SERVER_NAME=tests SYNAPSE_REPORT_STATS=no
 | 
			
		||||
 | 
			
		||||
# Generate keys for synapse
 | 
			
		||||
# Generate configuration and keys for synapse
 | 
			
		||||
WORKDIR $SYNAPSE_CONFIG_DIR
 | 
			
		||||
ADD tests/homeserver.yaml .
 | 
			
		||||
RUN python -m synapse.app.homeserver --config-path homeserver.yaml --generate-keys
 | 
			
		||||
RUN chown -R 991:991 .
 | 
			
		||||
RUN chown -R 991:991 . \
 | 
			
		||||
 && /start.py generate \
 | 
			
		||||
 && sed -i 's=/data=/srv=;s=8008=80=;s=#sup=sup=;' homeserver.yaml \
 | 
			
		||||
 && python -m synapse.app.homeserver --config-path homeserver.yaml --generate-keys
 | 
			
		||||
 | 
			
		||||
RUN pip install --no-cache-dir markdown matrix-nio httpx coverage
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue