diff --git a/Dockerfile b/Dockerfile index 87cc999..62a087f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,3 @@ -# FROM alpine:3.14 FROM python:3-alpine RUN apk add --no-cache --upgrade bash @@ -17,5 +16,5 @@ RUN set -e; \ pip install -r requirements.txt; \ apk del .build-deps; -EXPOSE 80 8080 +#EXPOSE 9090 ENTRYPOINT ["./start.sh"] diff --git a/docker-compose.yaml b/docker-compose.yaml index 16b6c6c..9584bdd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,18 +2,14 @@ version: '3' services: ldap-python-webui: image: aitzol/ldap-webui:latest + network_mode : host volumes: - ./data:/data:rw - ./settings.ini:/settings.ini # - ./certs:/container/service/slapd/assets/certs:rw # - ./schema:/container/service/slapd/assets/config/bootstrap/schema/custom - ports: - - 9090:80 +#ports: +# - 9090:80 environment: LDAP_ADMIN_PASSWORD: "admin" LDAP_READONLY_PASSWORD: "readonly" - -networks: - default: - external: true - name: ldap-python-webui-docker_default diff --git a/start.sh b/start.sh index 5620829..4e15427 100755 --- a/start.sh +++ b/start.sh @@ -1,2 +1,5 @@ #!/bin/bash -uwsgi --http :80 --enable-threads --wsgi-file app.py +if [ ! -f /tmp/foo.txt ]; then + cp settings.ini.example settings.ini +fi +uwsgi --http :9090 --enable-threads --wsgi-file app.py