Added kanboard and reformated some files
This commit is contained in:
		
							parent
							
								
									c468c81a00
								
							
						
					
					
						commit
						110b58921d
					
				
					 7 changed files with 538 additions and 532 deletions
				
			
		
							
								
								
									
										842
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										842
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
					@ -7,7 +7,7 @@ license = "MIT"
 | 
				
			||||||
readme = "README.md"
 | 
					readme = "README.md"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[tool.poetry.dependencies]
 | 
					[tool.poetry.dependencies]
 | 
				
			||||||
python = "^3.11"
 | 
					python = "^3.12"
 | 
				
			||||||
pyinfra = "^2.7"
 | 
					pyinfra = "^2.7"
 | 
				
			||||||
pyinfra-docker = "^2.1"
 | 
					pyinfra-docker = "^2.1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								services/kanboard/.env.example
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								services/kanboard/.env.example
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					HOST=
 | 
				
			||||||
 | 
					PLUGIN_INSTALLER=true
 | 
				
			||||||
							
								
								
									
										26
									
								
								services/kanboard/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								services/kanboard/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,26 @@
 | 
				
			||||||
 | 
					volumes:
 | 
				
			||||||
 | 
					  kanboard-data:
 | 
				
			||||||
 | 
					  kanboard-plugins:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					networks:
 | 
				
			||||||
 | 
					  traefik-net:
 | 
				
			||||||
 | 
					    external: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					services:
 | 
				
			||||||
 | 
					  kanboard:
 | 
				
			||||||
 | 
					    image: kanboard/kanboard:latest
 | 
				
			||||||
 | 
					    volumes:
 | 
				
			||||||
 | 
					      - kanboard-data:/var/www/app/data
 | 
				
			||||||
 | 
					      - kanboard-plugins:/var/www/app/plugins
 | 
				
			||||||
 | 
					    networks:
 | 
				
			||||||
 | 
					      - traefik-net
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      - PLUGIN_INSTALLER=${PLUGIN_INSTALLER}
 | 
				
			||||||
 | 
					    deploy:
 | 
				
			||||||
 | 
					      labels:
 | 
				
			||||||
 | 
					        - traefik.enable=true
 | 
				
			||||||
 | 
					        - traefik.docker.network=traefik-net
 | 
				
			||||||
 | 
					        - traefik.http.routers.kanboard.rule=Host(`${HOST}`)
 | 
				
			||||||
 | 
					        - traefik.http.routers.kanboard.entrypoints=websecure
 | 
				
			||||||
 | 
					        - traefik.http.routers.kanboard.tls.certresolver=le
 | 
				
			||||||
 | 
					        - traefik.http.services.kanboard.loadbalancer.server.port=80
 | 
				
			||||||
| 
						 | 
					@ -5,13 +5,13 @@ from pyinfra.operations import files, systemd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BASE_DIR = Path(__file__).parent.parent
 | 
					BASE_DIR = Path(__file__).parent.parent
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def deploy_ssh_keys():
 | 
					def deploy_ssh_keys():
 | 
				
			||||||
    files.file(
 | 
					    files.file(
 | 
				
			||||||
        name="Create authorized_keys file",
 | 
					        name="Create authorized_keys file",
 | 
				
			||||||
        path="/root/.ssh/authorized_keys"
 | 
					        path="/root/.ssh/authorized_keys"
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    for key_path in BASE_DIR.glob("pubkeys/*.pub"):
 | 
					    for key_path in BASE_DIR.glob("pubkeys/*.pub"):
 | 
				
			||||||
        with open(key_path, "r") as f:
 | 
					        with open(key_path, "r") as f:
 | 
				
			||||||
            key = f.read().strip()
 | 
					            key = f.read().strip()
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,7 @@ def deploy_ssh_keys():
 | 
				
			||||||
            line=key
 | 
					            line=key
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def reconfigure_ssh():
 | 
					def reconfigure_ssh():
 | 
				
			||||||
    config_changed = files.line(
 | 
					    config_changed = files.line(
 | 
				
			||||||
        name="Disable password login",
 | 
					        name="Disable password login",
 | 
				
			||||||
| 
						 | 
					@ -35,6 +36,7 @@ def reconfigure_ssh():
 | 
				
			||||||
        restarted=config_changed
 | 
					        restarted=config_changed
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@deploy
 | 
					@deploy
 | 
				
			||||||
def setup_ssh():
 | 
					def setup_ssh():
 | 
				
			||||||
    deploy_ssh_keys()
 | 
					    deploy_ssh_keys()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue