| 
									
										
										
										
											2023-09-25 03:13:17 +02:00
										 |  |  | #! /bin/bash
 | 
					
						
							|  |  |  | ### To be run from the root of the repository  | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Some pointers to get started: | 
					
						
							|  |  |  | # apt install npm | 
					
						
							|  |  |  | # apt install unzip | 
					
						
							|  |  |  | # npm i -g csp-logger | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # wget https://github.com/pietervdvn/latlon2country/raw/main/tiles.zip | 
					
						
							|  |  |  | # unzip tiles.zip | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MAPCOMPLETE_CONFIGURATION="config_hetzner" | 
					
						
							| 
									
										
										
										
											2023-09-25 11:30:50 +02:00
										 |  |  | npm run reset:layeroverview | 
					
						
							|  |  |  | npm run test | 
					
						
							| 
									
										
										
										
											2023-09-25 03:13:17 +02:00
										 |  |  | cp config.json config.json.bu && | 
					
						
							|  |  |  | cp ./scripts/hetzner/config.json . && | 
					
						
							|  |  |  | npm run prepare-deploy && | 
					
						
							|  |  |  | mv config.json.bu config.json && | 
					
						
							|  |  |  | zip dist.zip -r dist/* && | 
					
						
							|  |  |  | scp -r dist.zip hetzner:/root/ && | 
					
						
							|  |  |  | scp ./scripts/hetzner/config/* hetzner:/root/ | 
					
						
							| 
									
										
										
										
											2023-09-25 11:30:50 +02:00
										 |  |  | ssh hetzner -t "unzip dist.zip && rm dist.zip && rm -rf public/ && mv dist public && caddy stop && caddy start" | 
					
						
							|  |  |  | rm dist.zip | 
					
						
							| 
									
										
										
										
											2023-09-26 01:27:32 +02:00
										 |  |  | npm run clean |