Fixed issues with docker
This commit is contained in:
parent
de71ce9fbf
commit
713015adec
@ -45,4 +45,4 @@ def create_app(app_name: str='MRE') -> Flask:
|
|||||||
app.logger.info(f'HTTP {request.method} completed (path={request.path}, request_time={request_time}, status_code={response.status_code}).')
|
app.logger.info(f'HTTP {request.method} completed (path={request.path}, request_time={request_time}, status_code={response.status_code}).')
|
||||||
return response
|
return response
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
#! /usr/bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
|
python ./run.py
|
||||||
|
|
||||||
uwsgi --ini /var/www/run.py
|
|
||||||
|
|||||||
@ -9,9 +9,13 @@ ADD ./docker/entrypoint.sh /var/docker-entrypoint.sh
|
|||||||
RUN chmod +x /var/docker-entrypoint.sh
|
RUN chmod +x /var/docker-entrypoint.sh
|
||||||
|
|
||||||
# add the requirements and install them
|
# add the requirements and install them
|
||||||
|
|
||||||
ADD ./requirements.txt /var/www/requirements.txt
|
ADD ./requirements.txt /var/www/requirements.txt
|
||||||
RUN pip install -Ur /var/www/requirements.txt
|
RUN pip install -r /var/www/requirements.txt
|
||||||
|
ADD ./app/mre_module/requirements.txt /var/www/mre_reuirements.txt
|
||||||
|
RUN pip install -r /var/www/mre_reuirements.txt
|
||||||
|
# the multipolyfit package has a small bug, but it is easily fixed
|
||||||
|
RUN rm /usr/local/lib/python3.13/site-packages/multipolyfit/__init__.py
|
||||||
|
RUN echo "from .core import multipolyfit, mk_model, mk_sympy_function" >> /usr/local/lib/python3.13/site-packages/multipolyfit/__init__.py
|
||||||
|
|
||||||
# add the uwsgi runner
|
# add the uwsgi runner
|
||||||
ADD ./run.py /var/www/run.py
|
ADD ./run.py /var/www/run.py
|
||||||
@ -23,5 +27,8 @@ ENV PYTHONUNBUFFERED 1
|
|||||||
# Copy the app directory
|
# Copy the app directory
|
||||||
COPY ./app /var/www/app
|
COPY ./app /var/www/app
|
||||||
|
|
||||||
|
EXPOSE 80/tcp
|
||||||
|
EXPOSE 80/udp
|
||||||
|
|
||||||
# define the entrypoint
|
# define the entrypoint
|
||||||
ENTRYPOINT ["/var/docker-entrypoint.sh"]
|
CMD ["/var/docker-entrypoint.sh"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user