From 0bbd750d8ecd917636eea08630b97d8ecf469fd7 Mon Sep 17 00:00:00 2001 From: Josh VanDeraa Date: Wed, 3 May 2023 07:27:05 -0500 Subject: [PATCH] Update Version, Fix MySQL container, Update Format of Markdown Files, Change Postgres Version - 13 (#56) * Several updates. * Fix tests. --- .github/workflows/ci.yml | 2 +- Dockerfile-LDAP | 2 ++ README.md | 3 ++- docker-compose.mysql.yml | 4 +++- docker-compose.yml | 6 +++--- local.env.example | 8 ++++---- plugin_example/Dockerfile-Plugins | 1 + 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 653706eca..34aca15c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ --- name: "CI" -on: +on: # yamllint disable - "push" - "pull_request" jobs: diff --git a/Dockerfile-LDAP b/Dockerfile-LDAP index f669949f2..4f7211694 100644 --- a/Dockerfile-LDAP +++ b/Dockerfile-LDAP @@ -1,5 +1,7 @@ ARG PYTHON_VER=3.9 + ARG NAUTOBOT_VERSION=1.5.9 + FROM networktocode/nautobot:${NAUTOBOT_VERSION}-py${PYTHON_VER} as base USER 0 diff --git a/README.md b/README.md index e3adae579..84573fd1f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Network to Code has an existing published Nautobot Docker Image on Docker Hub. S By default, this project deploys the Nautobot application, a single worker container, Redis containers, and PostgresQL. It does not deploy NGINX, SSL, or any Nautobot plugins. However, the project is extensible to allow users to tailor to their specific requirements. For example, if you need to deploy [SSL](docs/create_ssl_cert.md) or [plugins](docs/plugins.md), see the docs linked. The web server used on the application is [pyuwsgi](https://uwsgi-docs.readthedocs.io/en/latest/). + ## Environment Variable Controls There are two variables that should be set for the Docker-Compose file. The following table covers the environment variables, default setting, and what it does. @@ -25,7 +26,7 @@ This documentation is now written assuming the latest Docker Compose methodology If you want to use MySQL for the database instead of postgres, In step 7 below instead use ``` -docker-compose -f docker-compose.yml -f docker-compose.mysql.yml up +docker compose -f docker-compose.yml -f docker-compose.mysql.yml up ``` ## Docker Compose diff --git a/docker-compose.mysql.yml b/docker-compose.mysql.yml index 820504327..b175095d8 100644 --- a/docker-compose.mysql.yml +++ b/docker-compose.mysql.yml @@ -2,7 +2,7 @@ version: "3.7" services: db: - image: "mariadb" + image: "mysql" env_file: - "local.env" environment: @@ -10,3 +10,5 @@ services: volumes: - "db_data:/var/lib/mysql" restart: "unless-stopped" +volumes: + db_data: diff --git a/docker-compose.yml b/docker-compose.yml index 6c3ce533e..7274bd292 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: nautobot: - image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.5.9}-py${PYTHON_VER:-3.9}" + image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.5.11}-py${PYTHON_VER:-3.9}" env_file: - "local.env" ports: @@ -13,7 +13,7 @@ services: # Celery worker must only be used in > 1.1.0 installs. If setting to a previous install, remove this worker # ---------------------------------- celery_worker: - image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.5.9}-py${PYTHON_VER:-3.9}" + image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.5.11}-py${PYTHON_VER:-3.9}" entrypoint: "sh -c 'nautobot-server celery worker -l $$NAUTOBOT_LOG_LEVEL'" healthcheck: interval: "5s" @@ -31,7 +31,7 @@ services: # Celery beat must only be used in > 1.2.0 installs. If setting to a previous install, remove this worker # ---------------------------------- celery_beat: - image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.5.9}-py${PYTHON_VER:-3.9}" + image: "networktocode/nautobot:${NAUTOBOT_IMAGE:-1.5.11}-py${PYTHON_VER:-3.9}" entrypoint: "sh -c 'nautobot-server celery beat -l $$NAUTOBOT_LOG_LEVEL'" healthcheck: interval: "5s" diff --git a/local.env.example b/local.env.example index 08e93d677..53e2516db 100644 --- a/local.env.example +++ b/local.env.example @@ -33,10 +33,10 @@ POSTGRES_PASSWORD=decinablesprewad POSTGRES_USER=nautobot # Needed for MariaDB, should match the values for Nautobot above -MARIADB_USER=nautobot -MARIADB_PASSWORD=decinablesprewad -MARIADB_DATABASE=nautobot -MARIADB_ROOT_PASSWORD=decinablesprewad +MYSQL_USER=nautobot +MYSQL_PASSWORD=decinablesprewad +MYSQL_DATABASE=nautobot +MYSQL_ROOT_PASSWORD=decinablesprewad NAUTOBOT_HIDE_RESTRICTED_UI=True NAUTOBOT_LOG_LEVEL=WARNING diff --git a/plugin_example/Dockerfile-Plugins b/plugin_example/Dockerfile-Plugins index f48f43cf2..08f8f36a7 100644 --- a/plugin_example/Dockerfile-Plugins +++ b/plugin_example/Dockerfile-Plugins @@ -1,4 +1,5 @@ ARG PYTHON_VER + ARG NAUTOBOT_VERSION=1.5.9 FROM networktocode/nautobot:${NAUTOBOT_VERSION}-py${PYTHON_VER}