Simplify cloud-init code
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							
								
								
									
										36
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								README.md
									
									
									
									
									
								
							@@ -99,45 +99,29 @@ One-click deployment:
 | 
				
			|||||||
* Heroku: <https://heroku.com/deploy?template=https://github.com/pictuga/morss>
 | 
					* Heroku: <https://heroku.com/deploy?template=https://github.com/pictuga/morss>
 | 
				
			||||||
* Google Cloud: <https://deploy.cloud.run/?git_repo=https://github.com/pictuga/morss.git>
 | 
					* Google Cloud: <https://deploy.cloud.run/?git_repo=https://github.com/pictuga/morss.git>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Providers supporting `cloud-init`, based on Ubuntu:
 | 
					Providers supporting `cloud-init` (AWS, Oracle Cloud Infrastructure), based on Ubuntu:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
``` yml
 | 
					``` yml
 | 
				
			||||||
#cloud-config
 | 
					#cloud-config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
packages:
 | 
					packages:
 | 
				
			||||||
  - docker.io
 | 
					  - python-pip
 | 
				
			||||||
  - docker-compose
 | 
					  - python-lxml
 | 
				
			||||||
 | 
					  - python-wheels
 | 
				
			||||||
  - git
 | 
					  - git
 | 
				
			||||||
  - ca-certificates
 | 
					  - ca-certificates
 | 
				
			||||||
 | 
					
 | 
				
			||||||
groups:
 | 
					 | 
				
			||||||
  - docker
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
system_info:
 | 
					 | 
				
			||||||
  default_user:
 | 
					 | 
				
			||||||
    groups: [docker]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
write_files:
 | 
					write_files:
 | 
				
			||||||
  - path: /docker-compose.yml
 | 
					  - path: /etc/environment
 | 
				
			||||||
    permissions: "0644"
 | 
					 | 
				
			||||||
    content: |
 | 
					    content: |
 | 
				
			||||||
      version: '3.7'
 | 
					      DEBUG=1
 | 
				
			||||||
      services:
 | 
					      CACHE=diskcache
 | 
				
			||||||
        app:
 | 
					      CACHE_SIZE=1073741824
 | 
				
			||||||
          build: 'https://git.pictuga.com/pictuga/morss.git#master'
 | 
					 | 
				
			||||||
          image: morss
 | 
					 | 
				
			||||||
          ports:
 | 
					 | 
				
			||||||
            - 80:8000
 | 
					 | 
				
			||||||
          environment:
 | 
					 | 
				
			||||||
            - DEBUG=1
 | 
					 | 
				
			||||||
            - CACHE=diskcache
 | 
					 | 
				
			||||||
            - CACHE_SIZE=1073741824
 | 
					 | 
				
			||||||
          restart: always
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
runcmd:
 | 
					runcmd:
 | 
				
			||||||
  - update-ca-certificates
 | 
					  - update-ca-certificates
 | 
				
			||||||
  - docker-compose -f /docker-compose.yml build --no-cache
 | 
					  - pip install git+https://git.pictuga.com/pictuga/morss.git#[full] gunicorn
 | 
				
			||||||
  - docker-compose -f /docker-compose.yml up -dV
 | 
					  - gunicorn --bind 0.0.0.0:${PORT:-8000} -w 4 --preload --access-logfile - morss
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Run
 | 
					## Run
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user