2023-10-13 06:46:08 +00:00
|
|
|
FROM python:3.11.1-alpine3.17 AS backend
|
|
|
|
|
|
|
|
# set environment variables
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
"bash~=5.2" \
|
|
|
|
"libpq~=15" \
|
|
|
|
"libxslt~=1.1" \
|
|
|
|
"nodejs-current~=19" \
|
|
|
|
"xmlsec~=1.2" \
|
|
|
|
"libffi-dev" \
|
|
|
|
"bash~=5.2" \
|
|
|
|
"g++~=12.2" \
|
|
|
|
"gcc~=12.2" \
|
|
|
|
"cargo~=1.64" \
|
|
|
|
"git~=2" \
|
|
|
|
"make~=4.3" \
|
|
|
|
"postgresql13-dev~=13" \
|
|
|
|
"libc-dev" \
|
|
|
|
"linux-headers"
|
|
|
|
|
|
|
|
WORKDIR /code
|
|
|
|
|
|
|
|
COPY requirements.txt ./requirements.txt
|
|
|
|
ADD requirements ./requirements
|
|
|
|
|
2023-12-08 09:47:51 +00:00
|
|
|
# Install the local development settings
|
|
|
|
RUN pip install -r requirements/local.txt --compile --no-cache-dir
|
2023-10-13 06:46:08 +00:00
|
|
|
|
|
|
|
RUN addgroup -S plane && \
|
|
|
|
adduser -S captain -G plane
|
|
|
|
|
2024-01-23 09:37:45 +00:00
|
|
|
COPY . .
|
2023-10-13 06:46:08 +00:00
|
|
|
|
2024-03-20 13:58:19 +00:00
|
|
|
RUN mkdir -p /code/plane/logs
|
2024-01-23 09:37:45 +00:00
|
|
|
RUN chown -R captain.plane /code
|
|
|
|
RUN chmod -R +x /code/bin
|
2023-10-13 06:46:08 +00:00
|
|
|
RUN chmod -R 777 /code
|
|
|
|
|
|
|
|
USER captain
|
|
|
|
|
|
|
|
# Expose container port and run entry point script
|
|
|
|
EXPOSE 8000
|
|
|
|
|
2023-12-14 10:48:02 +00:00
|
|
|
CMD [ "./bin/takeoff.local" ]
|
2023-10-13 06:46:08 +00:00
|
|
|
|