From 89e27f0e742e1f8996c23031f05918bdc5622255 Mon Sep 17 00:00:00 2001 From: atif09 Date: Sat, 24 Jan 2026 14:15:39 +0530 Subject: [PATCH 1/4] [docker-compose] Add DOCKER_TAG variable for version pinning #554 this change introduces a DOCKER_TAG environment variable that allows users to pin specific image versions in .env file. Both 'docker compose pull' and 'make pull' now respect this variable, ensuring consistent version behavior across all deployment methods. Changes: - Add DOCKER_TAG=latest to .env file - Update all OpenWISP image tags in docker-compose.yml to use ${DOCKER_TAG:-latest} - Update Makefile to include .env and use DOCKER_TAG when retagging images Fixes #554 --- .env | 1 + Makefile | 5 ++++- docker-compose.yml | 20 ++++++++++---------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.env b/.env index a30eda7d..a4530f1a 100644 --- a/.env +++ b/.env @@ -63,3 +63,4 @@ CELERY_SERVICE_NETWORK_MODE=service:openvpn METRIC_COLLECTION=True # collectstatic COLLECTSTATIC_WHEN_DEPS_CHANGE=true +DOCKER_TAG=latest \ No newline at end of file diff --git a/Makefile b/Makefile index 97545ab9..06bd0f57 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ # Find documentation in README.md under # the heading "Makefile Options". +include .env +export + OPENWISP_VERSION = 25.10.0 SHELL := /bin/bash .SILENT: clean pull start stop @@ -20,7 +23,7 @@ pull: 'openwisp-freeradius' 'openwisp-nginx' 'openwisp-openvpn' 'openwisp-postfix' \ 'openwisp-websocket' ; do \ docker pull --quiet $(USER)/$${image}:$(TAG); \ - docker tag $(USER)/$${image}:$(TAG) openwisp/$${image}:latest; \ + docker tag $(USER)/$${image}:$(TAG) openwisp/$${image}:$${DOCKER_TAG}; \ done # Build diff --git a/docker-compose.yml b/docker-compose.yml index f010ae3b..4e47e98a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ x-celery-depends-on: &celery-depends-on services: dashboard: - image: openwisp/openwisp-dashboard:latest + image: openwisp/openwisp-dashboard:${DOCKER_TAG:-latest} restart: always build: context: images @@ -35,7 +35,7 @@ services: - influxdb api: - image: openwisp/openwisp-api:latest + image: openwisp/openwisp-api:${DOCKER_TAG:-latest} restart: always build: context: images @@ -55,7 +55,7 @@ services: - dashboard websocket: - image: openwisp/openwisp-websocket:latest + image: openwisp/openwisp-websocket:${DOCKER_TAG:-latest} restart: always build: context: images @@ -70,7 +70,7 @@ services: - dashboard celery: - image: openwisp/openwisp-dashboard:latest + image: openwisp/openwisp-dashboard:${DOCKER_TAG:-latest} restart: always environment: - MODULE_NAME=celery @@ -85,7 +85,7 @@ services: network_mode: "${CELERY_SERVICE_NETWORK_MODE-service:openvpn}" celery_monitoring: - image: openwisp/openwisp-dashboard:latest + image: openwisp/openwisp-dashboard:${DOCKER_TAG:-latest} restart: always environment: - MODULE_NAME=celery_monitoring @@ -99,7 +99,7 @@ services: network_mode: "${CELERY_SERVICE_NETWORK_MODE-service:openvpn}" celerybeat: - image: openwisp/openwisp-dashboard:latest + image: openwisp/openwisp-dashboard:${DOCKER_TAG:-latest} restart: always environment: - MODULE_NAME=celerybeat @@ -113,7 +113,7 @@ services: - dashboard nginx: - image: openwisp/openwisp-nginx:latest + image: openwisp/openwisp-nginx:${DOCKER_TAG:-latest} restart: always build: context: images @@ -140,7 +140,7 @@ services: - websocket freeradius: - image: openwisp/openwisp-freeradius:latest + image: openwisp/openwisp-freeradius:${DOCKER_TAG:-latest} restart: always build: context: images @@ -156,7 +156,7 @@ services: - dashboard postfix: - image: openwisp/openwisp-postfix:latest + image: openwisp/openwisp-postfix:${DOCKER_TAG:-latest} restart: always build: context: images @@ -167,7 +167,7 @@ services: - openwisp_certs:/etc/ssl/mail openvpn: - image: openwisp/openwisp-openvpn:latest + image: openwisp/openwisp-openvpn:${DOCKER_TAG:-latest} restart: on-failure build: context: images From a4f27a0a997f6d5019988e954ff08d81a25558e9 Mon Sep 17 00:00:00 2001 From: atif09 Date: Sat, 24 Jan 2026 15:01:49 +0530 Subject: [PATCH 2/4] [docker-compose] Fix linter warnings for DOCKER_TAG #554 Move DOCKER_TAG variable placement in .env file to satisfy alphabetical ordering requirements and add missing EOF newline. Update Makefile to use fallback value for DOCKER_TAG variable. Related to #554 --- .env | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index a4530f1a..eb9e7bb4 100644 --- a/.env +++ b/.env @@ -8,6 +8,7 @@ API_DOMAIN=api.openwisp.org SSH_PRIVATE_KEY_PATH=/home/openwisp/.ssh/id_ed25519 SSH_PUBLIC_KEY_PATH=/home/openwisp/.ssh/id_ed25519.pub VPN_DOMAIN=openvpn.openwisp.org +DOCKER_TAG=25.10.0 EMAIL_DJANGO_DEFAULT=example@example.org DB_USER=admin DB_PASS=admin @@ -63,4 +64,3 @@ CELERY_SERVICE_NETWORK_MODE=service:openvpn METRIC_COLLECTION=True # collectstatic COLLECTSTATIC_WHEN_DEPS_CHANGE=true -DOCKER_TAG=latest \ No newline at end of file diff --git a/Makefile b/Makefile index 06bd0f57..6fd591fa 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ pull: 'openwisp-freeradius' 'openwisp-nginx' 'openwisp-openvpn' 'openwisp-postfix' \ 'openwisp-websocket' ; do \ docker pull --quiet $(USER)/$${image}:$(TAG); \ - docker tag $(USER)/$${image}:$(TAG) openwisp/$${image}:$${DOCKER_TAG}; \ + docker tag $(USER)/$${image}:$(TAG) openwisp/$${image}:$${DOCKER_TAG:-latest}; \ done # Build From aa3db9755ffbd15c819e9df34bf54cc25185ea36 Mon Sep 17 00:00:00 2001 From: atif09 Date: Sat, 31 Jan 2026 22:28:40 +0530 Subject: [PATCH 3/4] [fix] Changed DOCKER_TAG back to latest #554 Keeping DOCKER_TAG=latest avoids manual updating with each release, users will have to change this to the specific version by explicitly setting it to the desired version Related to #554 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 3f8b451e..5787494c 100644 --- a/.env +++ b/.env @@ -8,7 +8,7 @@ API_DOMAIN=api.openwisp.org SSH_PRIVATE_KEY_PATH=/home/openwisp/.ssh/id_ed25519 SSH_PUBLIC_KEY_PATH=/home/openwisp/.ssh/id_ed25519.pub VPN_DOMAIN=openvpn.openwisp.org -DOCKER_TAG=25.10.0 +DOCKER_TAG=latest EMAIL_DJANGO_DEFAULT=example@example.org DB_USER=admin DB_PASS=admin From 064b758f02130f2d3ee3c6a3b72cec3636d2c137 Mon Sep 17 00:00:00 2001 From: atif09 Date: Sat, 31 Jan 2026 22:40:32 +0530 Subject: [PATCH 4/4] [format] Changed DOCKER_TAG back to latest #554 dotenv-linter expects DOCKER_TAG to appear before SSH_PRIVATE_KEY_PATH Related to #554 --- .env | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 5787494c..450adb30 100644 --- a/.env +++ b/.env @@ -4,11 +4,12 @@ # Essential DASHBOARD_DOMAIN=dashboard.openwisp.org API_DOMAIN=api.openwisp.org +# Image tag pinning +DOCKER_TAG=latest # SSH Credentials Configurations SSH_PRIVATE_KEY_PATH=/home/openwisp/.ssh/id_ed25519 SSH_PUBLIC_KEY_PATH=/home/openwisp/.ssh/id_ed25519.pub VPN_DOMAIN=openvpn.openwisp.org -DOCKER_TAG=latest EMAIL_DJANGO_DEFAULT=example@example.org DB_USER=admin DB_PASS=admin