dockerizazioa

This commit is contained in:
aitzol 2023-12-15 23:21:56 +01:00
parent 645edec125
commit 4f0097ac1b
3 changed files with 12 additions and 11 deletions

View File

@ -1,9 +1,8 @@
FROM python:3-alpine
ARG USER_
ARG UID_
ENV USER_=admin
ENV UID_=1000
ARG USER_=admin
ARG UID_=1000
RUN apk add --no-cache --upgrade bash
ADD --chown=$UID_:$UID_ . /www
@ -19,8 +18,7 @@ RUN set -e; \
pip install -r requirements.txt; \
apk del .build-deps;
#RUN adduser -S -D $USER -u $UID_
#USER $USER
RUN adduser -S -D $USER_ -u $UID_
USER $USER_
ENTRYPOINT ["./start.sh", "$UID_"]
#CMD ["$UID_"]
ENTRYPOINT ["./start.sh"]

View File

@ -52,7 +52,7 @@ Konfiguraketa fitxategia sortu:
edo
docker build -t aitzol/ldap-webui:latest . --build-arg UID_=$UID
docker build -t aitzol/ldap-webui:latest . --build-arg UID_=$UID --build-arg USER_=$USER
#### Edukiontzia sortu

View File

@ -11,8 +11,11 @@ fi
if [[ $# -gt 0 ]]; then
UID_=$1
echo $UID_
export LDAP_ADMIN_PASSWORD=admin
export LDAP_READONLY_PASSWORD=readonly
else
UID_=$UID
fi
export LDAP_ADMIN_PASSWORD=admin
export LDAP_READONLY_PASSWORD=readonly
uwsgi --http :9090 --enable-threads --uid $UID_ --wsgi-file app.py