Add a bad docker config to test the setup error page (#70)
Add a configuration with apache and php, but no sqlite. Confirm that the setup error page displays on first load. Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/70 Co-authored-by: Greg Sarjeant <greg@subcultureofone.org> Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
This commit is contained in:
		
							parent
							
								
									eeb73eccd4
								
							
						
					
					
						commit
						f96616bcef
					
				
							
								
								
									
										22
									
								
								docker/apache/bad-configs/.htaccess
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docker/apache/bad-configs/.htaccess
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | ||||
| # Basic .htaccess for tkr on shared hosting | ||||
| # For use with included docker-compose.yml | ||||
| 
 | ||||
| # Enable mod_rewrite | ||||
| RewriteEngine On | ||||
| 
 | ||||
| # Set directory index | ||||
| DirectoryIndex public/index.php | ||||
| 
 | ||||
| # Block access to sensitive directories | ||||
| RewriteRule ^(storage|src|templates|config)(/.*)?$ - [F,L] | ||||
| 
 | ||||
| # Block access to hidden files | ||||
| RewriteRule ^\..*$ - [F,L] | ||||
| 
 | ||||
| # Block access to setup script | ||||
| RewriteRule ^tkr-setup\.php$ - [F,L] | ||||
| 
 | ||||
| # Route everything else through public/index.php | ||||
| RewriteCond %{REQUEST_FILENAME} !-f | ||||
| RewriteCond %{REQUEST_FILENAME} !-d | ||||
| RewriteRule ^(.*)$ public/index.php [L] | ||||
							
								
								
									
										22
									
								
								docker/apache/bad-configs/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docker/apache/bad-configs/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | ||||
| services: | ||||
|   apache-php-no-sqlite: | ||||
|     image: debian:bookworm | ||||
|     container_name: apache-no-sqlite-test | ||||
|     ports: | ||||
|       - "80:80" | ||||
|     volumes: | ||||
|       - ./config:/var/www/html/tkr/config | ||||
|       - ./public:/var/www/html/tkr/public | ||||
|       - ./src:/var/www/html/tkr/src | ||||
|       - ./storage:/var/www/html/tkr/storage | ||||
|       - ./templates:/var/www/html/tkr/templates | ||||
|       - ./tkr-setup.php:/var/www/html/tkr/tkr-setup.php | ||||
|       - ./docker/apache/shared-hosting/.htaccess:/var/www/html/tkr/.htaccess | ||||
|     command: > | ||||
|       bash -c "apt-get update && | ||||
|                apt-get install -y apache2 php libapache2-mod-php && | ||||
|                a2enmod rewrite headers expires php8.2 && | ||||
|                sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf && | ||||
|                chown -R www-data:www-data /var/www/html/tkr/storage && | ||||
|                apache2ctl -D FOREGROUND" | ||||
|     restart: unless-stopped | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user