Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions config/nautobot_config.py.ldap
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}

#########################
# #
Expand Down
1 change: 1 addition & 0 deletions environments/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 17 additions & 20 deletions environments/Dockerfile-LDAP
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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
Expand All @@ -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
Loading