First commit
This commit is contained in:
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@ -0,0 +1,35 @@
|
||||
FROM python:3.12-slim AS base-core-app
|
||||
|
||||
# Prevents Python from writing pyc files to disc (equivalent to python -B option)
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
# Prevents Python from buffering stdout and stderr (equivalent to python -u option)
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
# Sets python path to be able to import modules
|
||||
ENV PYTHONPATH=":/usr/src/app"
|
||||
# Sets the default python breakpoint to use pudb
|
||||
ENV PYTHONBREAKPOINT="pudb.set_trace"
|
||||
|
||||
# set work directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# set time
|
||||
RUN ln -fs /usr/share/zoneinfo/Europe/Madrid /etc/localtime
|
||||
RUN dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
# install software
|
||||
RUN apt update && apt upgrade -y
|
||||
RUN apt install -y build-essential python3-dev libpq-dev python3-pip sqlite3
|
||||
|
||||
# install dependencies
|
||||
RUN pip3 install --upgrade pip
|
||||
|
||||
COPY ./requirements.txt .
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
# api: fastapi
|
||||
COPY ./src/infra/api/fastapi/requirements.txt requirements_fastapi.txt
|
||||
RUN pip3 install -r requirements_fastapi.txt
|
||||
|
||||
# api: flask
|
||||
COPY ./src/infra/api/flask/requirements.txt requirements_flask.txt
|
||||
RUN pip3 install -r requirements_flask.txt
|
Reference in New Issue
Block a user