Prepare for Kubernetes migration
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone Build is passing
				
			This commit is contained in:
		| @@ -1,3 +1,2 @@ | |||||||
| kind: template | kind: template | ||||||
| load: docker.yaml | load: docker-multiarch.yaml | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| FROM harbor.k-space.ee/k-space/microservice-base | FROM harbor.k-space.ee/k-space/microservice-base | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| COPY *.py ./ | COPY app /app | ||||||
| CMD python doorboy.py | CMD /app/doorboy-proxy.py | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								doorboy.py → app/doorboy-proxy.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										3
									
								
								doorboy.py → app/doorboy-proxy.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @@ -1,10 +1,13 @@ | |||||||
|  | #!/usr/bin/env python3 | ||||||
| from sanic import Sanic | from sanic import Sanic | ||||||
| from sanic.response import text, json | from sanic.response import text, json | ||||||
|  | from sanic_prometheus import monitor | ||||||
| from motor.motor_asyncio import AsyncIOMotorClient | from motor.motor_asyncio import AsyncIOMotorClient | ||||||
| import pymongo | import pymongo | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| app = Sanic(__name__) | app = Sanic(__name__) | ||||||
|  | monitor(app).expose_endpoint() | ||||||
| 
 | 
 | ||||||
| DOORBOY_SECRET = os.environ["DOORBOY_SECRET"] | DOORBOY_SECRET = os.environ["DOORBOY_SECRET"] | ||||||
| MONGO_URI = os.getenv("MONGO_URI", | MONGO_URI = os.getenv("MONGO_URI", | ||||||
| @@ -1,2 +0,0 @@ | |||||||
| sanic |  | ||||||
| motor |  | ||||||
		Reference in New Issue
	
	Block a user