Version-pin images: APP_VERSION for own builds, MARIADB/REDIS for services

No more :latest. Per-stack env vars set the version; prod uses Git tags,
dev uses 'dev' (rebuilt each push).
master
Boban Blaskovic 2026-05-31 18:17:09 +02:00
parent fa84fac440
commit fb0fc26a21
2 changed files with 15 additions and 7 deletions

View File

@ -43,7 +43,7 @@ services:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
target: nginx target: nginx
image: ${STACK_NAME:-clupilot}/nginx:latest image: ${STACK_NAME:-clupilot}/nginx:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-nginx container_name: ${STACK_NAME:-clupilot}-nginx
restart: unless-stopped restart: unless-stopped
ports: ports:
@ -62,7 +62,7 @@ services:
app: app:
build: *php-build build: *php-build
image: ${STACK_NAME:-clupilot}/php:latest image: ${STACK_NAME:-clupilot}/php:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-app container_name: ${STACK_NAME:-clupilot}-app
restart: unless-stopped restart: unless-stopped
environment: *php-env environment: *php-env
@ -77,7 +77,7 @@ services:
queue: queue:
build: *php-build build: *php-build
image: ${STACK_NAME:-clupilot}/php:latest image: ${STACK_NAME:-clupilot}/php:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-queue container_name: ${STACK_NAME:-clupilot}-queue
restart: unless-stopped restart: unless-stopped
command: php artisan queue:work --tries=3 --timeout=120 command: php artisan queue:work --tries=3 --timeout=120
@ -95,7 +95,7 @@ services:
scheduler: scheduler:
build: *php-build build: *php-build
image: ${STACK_NAME:-clupilot}/php:latest image: ${STACK_NAME:-clupilot}/php:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-scheduler container_name: ${STACK_NAME:-clupilot}-scheduler
restart: unless-stopped restart: unless-stopped
command: php artisan schedule:work command: php artisan schedule:work
@ -111,7 +111,7 @@ services:
reverb: reverb:
build: *php-build build: *php-build
image: ${STACK_NAME:-clupilot}/php:latest image: ${STACK_NAME:-clupilot}/php:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-reverb container_name: ${STACK_NAME:-clupilot}-reverb
restart: unless-stopped restart: unless-stopped
command: php artisan reverb:start --host=0.0.0.0 --port=8080 command: php artisan reverb:start --host=0.0.0.0 --port=8080
@ -126,7 +126,7 @@ services:
networks: [clu] networks: [clu]
mysql: mysql:
image: mariadb:11 image: mariadb:${MARIADB_VERSION:-11.4}
container_name: ${STACK_NAME:-clupilot}-mysql container_name: ${STACK_NAME:-clupilot}-mysql
restart: unless-stopped restart: unless-stopped
environment: environment:
@ -145,7 +145,7 @@ services:
start_period: 30s start_period: 30s
redis: redis:
image: redis:7-alpine image: redis:${REDIS_VERSION:-7.4-alpine}
container_name: ${STACK_NAME:-clupilot}-redis container_name: ${STACK_NAME:-clupilot}-redis
restart: unless-stopped restart: unless-stopped
volumes: volumes:

View File

@ -7,6 +7,14 @@ STACK_NAME=clupilot
HTTP_PORT=80 HTTP_PORT=80
MAILPIT_UI_PORT=8025 MAILPIT_UI_PORT=8025
# ---- Version pins ----
# Your own images: set per-deploy. Use Git tag (v1.2.3) or commit SHA for prod;
# 'dev' is fine for dev stack (rebuilt on every push).
APP_VERSION=dev
# Service images: bump in lockstep across all stacks.
MARIADB_VERSION=11.4
REDIS_VERSION=7.4-alpine
# ---- Laravel app ---- # ---- Laravel app ----
APP_NAME=CluPilot APP_NAME=CluPilot
APP_ENV=production APP_ENV=production