Flask -> FastAPI
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -1,26 +1,17 @@
|
||||
#Building main conteiner
|
||||
FROM python:slim-buster
|
||||
|
||||
RUN apt-get update && apt-get -y install curl supervisor gettext-base build-essential libboost-dev nginx libboost-system-dev libboost-thread-dev
|
||||
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash
|
||||
RUN apt-get install nodejs
|
||||
|
||||
RUN npm install serve -g --silent
|
||||
RUN apt-get update && apt-get -y install build-essential libboost-system-dev libboost-thread-dev
|
||||
|
||||
RUN mkdir /execute
|
||||
WORKDIR /execute
|
||||
|
||||
ADD ./backend/requirements.txt /execute/requirements.txt
|
||||
RUN pip install --no-cache-dir -r /execute/requirements.txt
|
||||
|
||||
COPY ./backend/ /execute/
|
||||
RUN pip install --no-cache-dir -r /execute/requirements.txt
|
||||
|
||||
ARG GCC_PARAMS
|
||||
RUN c++ -O3 $GCC_PARAMS -o proxy/proxy proxy/proxy.cpp -pthread -lboost_system -lboost_thread
|
||||
|
||||
COPY ./config/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
COPY ./config/nginx.conf /tmp/nginx.conf
|
||||
COPY ./config/start_nginx.sh /tmp/start_nginx.sh
|
||||
COPY ./frontend/build/ ./frontend/
|
||||
|
||||
RUN usermod -a -G root nobody
|
||||
@@ -29,6 +20,6 @@ RUN chown -R nobody:root /execute && \
|
||||
|
||||
RUN chmod ug+x /execute/proxy/proxy
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord","-c","/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["python3", "app.py", "DOCKER"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user