2023-01-09 15:11:23 +00:00
|
|
|
FROM python:3.10-alpine
|
2016-07-07 12:23:59 +00:00
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
ENV DJANGO_SETTINGS_MODULE 'config.docker-compose'
|
|
|
|
|
|
|
|
RUN mkdir /code
|
|
|
|
WORKDIR /code
|
|
|
|
|
|
|
|
ADD requirements.txt /code/
|
2024-05-04 19:53:02 +00:00
|
|
|
RUN apk add --no-cache postgresql-libs libstdc++
|
2024-05-04 20:09:03 +00:00
|
|
|
RUN apk add --no-cache --virtual .build-deps gcc g++ musl-dev \
|
2024-05-04 21:02:06 +00:00
|
|
|
postgresql-dev rust cargo && \
|
2024-05-04 20:09:03 +00:00
|
|
|
python3 -m pip install -r requirements.txt --no-cache-dir && \
|
|
|
|
apk --purge del .build-deps
|
2016-07-07 12:23:59 +00:00
|
|
|
ADD . /code/
|
|
|
|
|
2021-05-17 20:08:04 +00:00
|
|
|
RUN addgroup -g 1000 -S pokeapi && \
|
|
|
|
adduser -u 1000 -S pokeapi -G pokeapi
|
|
|
|
|
|
|
|
USER pokeapi
|
2021-05-28 09:52:40 +00:00
|
|
|
CMD gunicorn config.wsgi:application -c gunicorn.conf.py
|
2021-05-14 17:49:23 +00:00
|
|
|
EXPOSE 80
|