diff --git a/config/nautobot_config.py.ldap b/config/nautobot_config.py.ldap index 6ddfd11bc..7e31e4ecb 100644 --- a/config/nautobot_config.py.ldap +++ b/config/nautobot_config.py.ldap @@ -41,13 +41,11 @@ CACHEOPS_REDIS = parse_redis_connection(redis_database=1) # # Enable installed plugins. Add the name of each plugin to the list. -PLUGINS = ["nautobot_example_plugin"] +PLUGINS = [] # Plugins configuration settings. These settings are used by various plugins that the user may have installed. # Each key in the dictionary is the name of an installed plugin and its value is a dictionary of settings. -PLUGINS_CONFIG = { - "nautobot_example_plugin": {}, -} +PLUGINS_CONFIG = {} ######################### # # diff --git a/environments/Dockerfile b/environments/Dockerfile index fd39a6c68..f668c9d22 100644 --- a/environments/Dockerfile +++ b/environments/Dockerfile @@ -56,6 +56,7 @@ WORKDIR /source FROM nautobot-base as nautobot ARG PYTHON_VER + # Copy from base the required python libraries and binaries COPY --from=builder /tmp/dist /tmp/dist COPY --from=builder /opt/nautobot /opt/nautobot diff --git a/environments/Dockerfile-LDAP b/environments/Dockerfile-LDAP index cc1aa24bc..bc5ef8b78 100644 --- a/environments/Dockerfile-LDAP +++ b/environments/Dockerfile-LDAP @@ -23,9 +23,9 @@ RUN apt-get update && \ RUN apt-get install -y libldap2-dev libsasl2-dev libssl-dev -COPY ./pyproject.toml ./poetry.lock /source/ +COPY ../pyproject.toml ../poetry.lock /source/ COPY ../plugins /source/plugins -# COPY ./packages /source/packages +# COPY ../packages /source/packages # Install the nautobot project to include Nautobot RUN cd /source && \ @@ -38,16 +38,16 @@ RUN cd /source && \ RUN pip3 install --upgrade pip wheel && pip3 install django-auth-ldap # ------------------------------------------------------------------------------------- -# Install all included plugins +# Build Apps in plugins folder # ------------------------------------------------------------------------------------- -RUN for plugin in /source/plugins/*; do \ - cd $plugin && \ - poetry build && \ - cp dist/*.whl /tmp/dist; \ - done - -COPY ./jobs /opt/nautobot/jobs -# COPY ./metrics /opt/nautobot/metrics +# RUN for plugin in /source/plugins/*; do \ +# cd $plugin && \ +# poetry build && \ +# cp dist/*.whl /tmp/dist; \ +# done + +COPY ../jobs /opt/nautobot/jobs +# COPY ../metrics /opt/nautobot/metrics COPY ../config/nautobot_config.py.ldap /opt/nautobot/nautobot_config.py WORKDIR /source @@ -58,21 +58,18 @@ WORKDIR /source # Final Image # ------------------------------------------------------------------------------------- FROM nautobot-base as nautobot + ARG PYTHON_VER # Copy from base the required python libraries and binaries COPY --from=builder /tmp/dist /tmp/dist +COPY --from=builder /opt/nautobot /opt/nautobot COPY --from=builder /usr/local/lib/python${PYTHON_VER}/site-packages /usr/local/lib/python${PYTHON_VER}/site-packages COPY --from=builder /usr/local/bin /usr/local/bin -COPY --from=builder /opt/nautobot /opt/nautobot -# COPY ./packages /source/packages +# COPY ../packages /source/packages -RUN grep -v /source/plugins /tmp/dist/requirements.txt > /tmp/dist/new_requirements.txt && \ - pip install -r /tmp/dist/new_requirements.txt && \ - pip install /tmp/dist/*.whl && \ - rm -rf /source /tmp/dist && \ - chown -R nautobot:nautobot /opt/nautobot +# Verify that pyuwsgi was installed correctly, i.e. with SSL support +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN pyuwsgi --cflags | sed 's/ /\n/g' | grep -e "^-DUWSGI_SSL$" USER nautobot - -WORKDIR /opt/nautobot