dockerize
This commit is contained in:
		
							
								
								
									
										18
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | # Use the official Python base image | ||||||
|  | FROM python:3.9-slim | ||||||
|  |  | ||||||
|  | # Set the working directory in the container | ||||||
|  | WORKDIR /app | ||||||
|  |  | ||||||
|  | # Copy the current directory contents into the container at /app | ||||||
|  | COPY . /app | ||||||
|  |  | ||||||
|  | # Install the dependencies | ||||||
|  | RUN pip install --no-cache-dir -r requirements.txt | ||||||
|  |  | ||||||
|  | # Expose port 5000 to the outside world | ||||||
|  | EXPOSE 5000 | ||||||
|  |  | ||||||
|  | # Command to run the Flask app | ||||||
|  | CMD ["python", "app.py"] | ||||||
|  |  | ||||||
							
								
								
									
										26
									
								
								docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | |||||||
|  | version: '3.8' | ||||||
|  |  | ||||||
|  | services: | ||||||
|  |   traefik-frontend: | ||||||
|  |     container_name: traefik-frontend | ||||||
|  |     build: | ||||||
|  |       context: . | ||||||
|  |       dockerfile: Dockerfile | ||||||
|  |     volumes: | ||||||
|  |       - /var/run/docker.sock:/var/run/docker.sock:ro | ||||||
|  |     environment: | ||||||
|  |       FLASK_ENV: development | ||||||
|  |     networks: | ||||||
|  |       - web | ||||||
|  |     labels: | ||||||
|  |       - "traefik.enable=true" | ||||||
|  |       - "traefik.http.routers.home.rule=Host(`home.gederico.dynu.net`)" | ||||||
|  |       - "traefik.http.routers.home.tls.certresolver=leresolver" | ||||||
|  |       - "traefik.http.routers.home.entrypoints=websecure" | ||||||
|  |       - "traefik.http.routers.home.middlewares=chain-authelia@file" | ||||||
|  |       - "traefik.http.services.home.loadbalancer.server.port=5000" | ||||||
|  |       - "traefik.http.services.home.loadbalancer.server.scheme=http" | ||||||
|  |  | ||||||
|  | networks: | ||||||
|  |   web: | ||||||
|  |     external: true | ||||||
							
								
								
									
										3
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | docker==7.1.0 | ||||||
|  | Flask==2.3.2 | ||||||
|  | Requests==2.32.3 | ||||||
		Reference in New Issue
	
	Block a user