Added kanboard and reformated some files
This commit is contained in:
		
							parent
							
								
									c468c81a00
								
							
						
					
					
						commit
						110b58921d
					
				
					 7 changed files with 538 additions and 532 deletions
				
			
		
							
								
								
									
										1018
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1018
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -7,7 +7,7 @@ license = "MIT"
 | 
			
		|||
readme = "README.md"
 | 
			
		||||
 | 
			
		||||
[tool.poetry.dependencies]
 | 
			
		||||
python = "^3.11"
 | 
			
		||||
python = "^3.12"
 | 
			
		||||
pyinfra = "^2.7"
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def deploy_ssh_keys():
 | 
			
		||||
    files.file(
 | 
			
		||||
        name="Create authorized_keys file",
 | 
			
		||||
        path="/root/.ssh/authorized_keys"
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    for key_path in BASE_DIR.glob("pubkeys/*.pub"):
 | 
			
		||||
        with open(key_path, "r") as f:
 | 
			
		||||
            key = f.read().strip()
 | 
			
		||||
| 
						 | 
				
			
			@ -21,6 +21,7 @@ def deploy_ssh_keys():
 | 
			
		|||
            line=key
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def reconfigure_ssh():
 | 
			
		||||
    config_changed = files.line(
 | 
			
		||||
        name="Disable password login",
 | 
			
		||||
| 
						 | 
				
			
			@ -35,6 +36,7 @@ def reconfigure_ssh():
 | 
			
		|||
        restarted=config_changed
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@deploy
 | 
			
		||||
def setup_ssh():
 | 
			
		||||
    deploy_ssh_keys()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue