diff --git a/Dockerfile b/Dockerfile index 8f03ba0..e17b1df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,5 +12,7 @@ EXPOSE 5000 ENV PYTHONUNBUFFERED=1 ENV PYTHONIOENCODING=utf-8 +VOLUME ["/app/data"] + # Use Gunicorn instead of python main.py CMD ["gunicorn", "--bind", "0.0.0.0:5000", "-k", "gevent", "--workers", "1", "--timeout", "120", "--access-logfile", "-", "--error-logfile", "-", "--log-level", "info", "main:app"] \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index ef29c38..9c4f2f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -61,6 +61,7 @@ pipeline { docker run -d \\ --name ${FLASK_CONTAINER_NAME} \\ --network ${NETWORK_NAME} \\ + -v ${FLASK_CONTAINER_NAME}_data:/app/data \\ ${BACKEND_IMAGE} """