Skip to content

Commit

Permalink
fix python version
Browse files Browse the repository at this point in the history
ref: #38
  • Loading branch information
mr-ssd authored and Sida Say committed Jun 28, 2022
1 parent ffd3a0e commit 61f04c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
22 changes: 9 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
FROM nginx:1.22.0
FROM python:3.8.13-bullseye

LABEL maintainer="Sida Say <sida.say@khalibre.com>"

ARG REQUIRED_PACKAGE="ca-certificates git supervisor gettext-base nginx"

RUN set -xe; \
apt-get -y update && \
apt-get install -y ca-certificates \
pip \
python3 \
python3-venv \
python3-wheel \
git \
supervisor
apt-get install -y ${REQUIRED_PACKAGE}

RUN mkdir -p mkdir /etc/privacyidea/data/keys \
/opt/privacyidea \
Expand All @@ -26,7 +22,7 @@ RUN mkdir -p mkdir /etc/privacyidea/data/keys \
COPY --chown=privacyidea:privacyidea ./configs/pi-config.template /etc/privacyidea/pi-config.template

# Remove default configuration from Nginx
RUN rm /etc/nginx/conf.d/default.conf
# RUN rm /etc/nginx/conf.d/default.conf

COPY ./configs/nginx /etc/nginx/templates

Expand Down Expand Up @@ -84,10 +80,10 @@ ENV VIRTUAL_ENV=/opt/privacyidea
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip install wheel && \
pip install supervisor uwsgi pymysql-sa PyMySQL psycopg2-binary && \
pip install -r https://raw.githubusercontent.com/privacyidea/privacyidea/v${PI_VERSION}/requirements.txt && \
pip install git+https://github.com/privacyidea/privacyidea.git@v${PI_VERSION}
RUN pip3 install wheel && \
pip3 install supervisor uwsgi pymysql-sa PyMySQL psycopg2-binary && \
pip3 install -r https://raw.githubusercontent.com/privacyidea/privacyidea/v${PI_VERSION}/requirements.txt && \
pip3 install git+https://github.com/privacyidea/privacyidea.git@v${PI_VERSION}

EXPOSE 80/tcp
EXPOSE 443/tcp
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ The Khalibre privacyIDEA requires a database to work. This is configured with th

### NGINX configuration

- `USE_NGINX_MAX_UPLOAD`: Get the maximum upload file size for Nginx, default to 0: unlimited
- `USE_NGINX_WORKER_PROCESSES`: Get the number of workers for Nginx, default to 1
- `NGINX_WORKER_CONNECTIONS`: Set the max number of connections per worker for Nginx, if requested. Cannot exceed worker_rlimit_nofile, see NGINX_WORKER_OPEN_FILES below
- `NGINX_MAX_UPLOAD`: Get the maximum upload file size for Nginx, default to 100Mb
- `NGINX_WORKER_PROCESSES`: Get the number of workers for Nginx, default to 1
- `NGINX_WORKER_CONNECTIONS`: Set the max number of connections per worker for Nginx, if requested.
- `NGINX_SERVER_TOKENS`: Hide Nginx server version on error pages and in the “Server HTTP” response header field
- `USE_LISTEN_PORT`: Get the listen port for Nginx, default to 80

Expand Down

0 comments on commit 61f04c4

Please sign in to comment.