* backend: refactor swarm support to also support podman (#260) - implement podman support as subclass of swarm deployment - podman is used when 'RUNTIME=podman' env var is set - podman socket is mapped instead of docker socket - podman-compose is used instead of docker-compose (though docker-compose works with podman, it does not support secrets, but podman-compose does) - separate cli utils into SwarmRunner and PodmanRunner which extends it - using config.yaml and config.env, both copied from sample versions - work on simplifying config: add docker-compose.podman.yml and docker-compose.swarm.yml and signing and debug configs in ./configs - add {build,run,stop}-{swarm,podman}.sh in scripts dir - add init-configs, only copy if configs don't exist - build local image use current version of podman, to support both podman 3.x and 4.x - additional fixes for after testing podman on centos - docs: update Deployment.md to cover swarm, podman, k8s deployment
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| # Docker Swarm Override
 | |
| #
 | |
| # Use for deploying on docker swarm:
 | |
| # docker stack deploy -c docker-compose.yml -c docker-compose.swarm.yml btrix
 | |
| 
 | |
| 
 | |
| version: '3.8'
 | |
| 
 | |
| services:
 | |
|   backend:
 | |
|     volumes:
 | |
|       - "/var/run/docker.sock:/var/run/docker.sock"
 | |
| 
 | |
|     deploy:
 | |
|       placement:
 | |
|         constraints:
 | |
|           - node.role == manager
 | |
| 
 | |
|     environment:
 | |
|       - "RUNTIME=swarm"
 | |
| 
 | |
|   swarm-cronjob:
 | |
|     image: crazymax/swarm-cronjob
 | |
|     volumes:
 | |
|       - "/var/run/docker.sock:/var/run/docker.sock"
 | |
| 
 | |
|     environment:
 | |
|       - "TZ=UTC"
 | |
|       - "LOG_LEVEL=debug"
 | |
|       - "LOG_JSON=false"
 | |
| 
 | |
|     deploy:
 | |
|       placement:
 | |
|         constraints:
 | |
|           - node.role == manager
 | |
| 
 | |
|   prune-resources:
 | |
|     image: docker
 | |
|     command: ["docker", "volumes", "prune", "-f", "--filter", "label=crawl"]
 | |
|     volumes:
 | |
|       - "/var/run/docker.sock:/var/run/docker.sock"
 | |
|     deploy:
 | |
|       mode: global
 | |
|       labels:
 | |
|         - "swarm.cronjob.enable=true"
 | |
|         - "swarm.cronjob.schedule=0 */5 * * *"
 | |
|         - "swarm.cronjob.skip-running=false"
 | |
|       restart_policy:
 | |
|         condition: none
 |