Add docker compose

This commit is contained in:
Digital Studium 2025-05-14 19:01:58 +03:00
parent 881dcd1d58
commit a192c1951d
3 changed files with 31 additions and 1 deletions

18
cert_decoder/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
# Use an official lightweight Python image
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY main.py .
# Expose the port the app runs on
EXPOSE 5000
# Command to run the application
CMD ["python", "main.py"]

View File

@ -0,0 +1,12 @@
version: '3.8'
services:
certdecoder:
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:5000"
environment:
- FLASK_ENV=production
restart: unless-stopped

View File

@ -78,4 +78,4 @@ def index():
if __name__ == "__main__":
app.run(debug=True, port=5000)
app.run(debug=True, port=5000, host='0.0.0.0')