Microservie docker update
This commit is contained in:
@ -12,8 +12,8 @@ COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt \
|
||||
--timeout=100 || pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
# Copy application code - MUST include microservice.py
|
||||
COPY microservice.py .
|
||||
|
||||
ENV FLASK_ENV=production
|
||||
ENV FLASK_APP=microservice.py
|
||||
@ -22,4 +22,5 @@ ENV FLASK_RUN_PORT=5001
|
||||
|
||||
EXPOSE 5001
|
||||
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:5001", "--workers", "2", "--timeout", "120", "microservice:app"]
|
||||
# Use python -m to run the module directly
|
||||
CMD ["python", "-m", "gunicorn", "--bind", "0.0.0.0:5001", "--workers", "2", "--timeout", "120", "microservice:app"]
|
||||
Reference in New Issue
Block a user