2023-02-21 14:21:53 +08:00
|
|
|
FROM python:3.10-slim
|
|
|
|
LABEL maintainer="Websoft9<help@websoft9.com>"
|
2023-03-24 15:32:38 +08:00
|
|
|
|
2023-05-14 10:05:26 +08:00
|
|
|
# Create API Directory
|
2023-02-21 14:21:53 +08:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2023-05-11 10:47:59 +08:00
|
|
|
# Copy source and install pip dpendencies
|
2023-03-24 12:44:01 +08:00
|
|
|
COPY api ./api
|
|
|
|
COPY static ./static
|
|
|
|
COPY requirements.txt main.py ./
|
2023-04-04 09:25:13 +08:00
|
|
|
RUN apt update
|
2023-04-06 13:07:21 +08:00
|
|
|
|
2023-05-19 14:48:27 +08:00
|
|
|
# Install supervisordss
|
2023-04-04 09:28:01 +08:00
|
|
|
RUN apt install -y supervisor
|
2023-04-04 09:51:08 +08:00
|
|
|
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
COPY config/cmd.sh /cmd.sh
|
|
|
|
RUN chmod +x /etc/supervisor/conf.d/supervisord.conf /cmd.sh
|
2023-02-21 14:21:53 +08:00
|
|
|
RUN pip install -r requirements.txt
|
2023-03-02 17:27:43 +08:00
|
|
|
RUN mkdir /data
|
2023-02-21 14:21:53 +08:00
|
|
|
|
2023-05-11 17:29:14 +08:00
|
|
|
# Expose the port in which the application will be deployed
|
2023-05-16 15:48:43 +08:00
|
|
|
EXPOSE 5000
|