2023-03-27 22:22:13 +00:00
|
|
|
FROM python:3.10-slim
|
2022-03-08 14:19:19 +00:00
|
|
|
|
2022-04-04 13:51:43 +00:00
|
|
|
# Change the working directory to the root of the project
|
2022-03-08 14:19:19 +00:00
|
|
|
WORKDIR /srv/flask_app
|
|
|
|
|
2023-03-27 22:22:13 +00:00
|
|
|
# Create venv
|
|
|
|
RUN python -m venv myvenv
|
|
|
|
ENV PATH="myvenv/bin:$PATH"
|
|
|
|
|
2022-04-04 13:51:43 +00:00
|
|
|
# Install the dependencies
|
2023-03-27 22:22:13 +00:00
|
|
|
COPY requirements.txt /srv/flask_app/
|
2022-03-08 14:19:19 +00:00
|
|
|
RUN pip install -r requirements.txt --src /usr/local/src --no-warn-script-location
|
|
|
|
|
2022-04-04 13:51:43 +00:00
|
|
|
# Copy the source code to the working directory
|
2023-03-27 22:22:13 +00:00
|
|
|
COPY . /srv/flask_app
|
2022-04-04 13:51:43 +00:00
|
|
|
|
2022-04-26 07:48:34 +00:00
|
|
|
# Change file permissions
|
|
|
|
RUN chmod +x ./deploy/start.sh
|
|
|
|
|
2022-04-26 07:46:13 +00:00
|
|
|
# Run the app
|
|
|
|
CMD ["./deploy/start.sh"]
|