Move dev bind-mounts to docker-compose.override.yml (keep Portainer stack clean)

docker-compose.yml no longer contains ./app:/var/www/html bind-mounts.
Local dev bind-mounts live in docker-compose.override.yml which docker
compose CLI auto-merges but Portainer does not read (Portainer uses
either docker-compose.yml or docker-compose.portainer.yml).

This prevents future Portainer 'Limited' state caused by CLI deploys
overwriting Portainer-managed containers.
master
Boban Blaskovic 2026-05-31 23:37:04 +02:00
parent da90b39085
commit b605e0cd4f
2 changed files with 38 additions and 6 deletions

View File

@ -0,0 +1,38 @@
# Local dev overrides — auto-merged by `docker compose` CLI on this host.
# Portainer uses docker-compose.yml or docker-compose.portainer.yml only;
# it never reads this file, so the Portainer stack stays clean.
#
# What this adds:
# - bind-mount ./app:/var/www/html on PHP services + nginx
# so vite HMR + code edits propagate without image rebuild.
#
# To run only the Portainer-shape compose locally (without bind-mounts):
# docker compose -f docker-compose.yml up -d
#
# To run with the override:
# docker compose up -d (auto-loads docker-compose.override.yml)
services:
nginx:
volumes:
- ./app:/var/www/html
app:
volumes:
- ./app:/var/www/html
- app-storage:/var/www/html/storage
queue:
volumes:
- ./app:/var/www/html
- app-storage:/var/www/html/storage
scheduler:
volumes:
- ./app:/var/www/html
- app-storage:/var/www/html/storage
reverb:
volumes:
- ./app:/var/www/html
- app-storage:/var/www/html/storage

View File

@ -50,8 +50,6 @@ services:
- "${HTTP_PORT:-80}:80" - "${HTTP_PORT:-80}:80"
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
volumes:
- ./app:/var/www/html
depends_on: depends_on:
app: app:
condition: service_started condition: service_started
@ -71,7 +69,6 @@ services:
restart: unless-stopped restart: unless-stopped
environment: *php-env environment: *php-env
volumes: volumes:
- ./app:/var/www/html
- app-storage:/var/www/html/storage - app-storage:/var/www/html/storage
depends_on: depends_on:
mysql: mysql:
@ -88,7 +85,6 @@ services:
command: php artisan queue:work --tries=3 --timeout=120 command: php artisan queue:work --tries=3 --timeout=120
environment: *php-env environment: *php-env
volumes: volumes:
- ./app:/var/www/html
- app-storage:/var/www/html/storage - app-storage:/var/www/html/storage
depends_on: depends_on:
mysql: mysql:
@ -107,7 +103,6 @@ services:
command: php artisan schedule:work command: php artisan schedule:work
environment: *php-env environment: *php-env
volumes: volumes:
- ./app:/var/www/html
- app-storage:/var/www/html/storage - app-storage:/var/www/html/storage
depends_on: depends_on:
mysql: mysql:
@ -124,7 +119,6 @@ services:
command: php artisan reverb:start --host=0.0.0.0 --port=8080 command: php artisan reverb:start --host=0.0.0.0 --port=8080
environment: *php-env environment: *php-env
volumes: volumes:
- ./app:/var/www/html
- app-storage:/var/www/html/storage - app-storage:/var/www/html/storage
depends_on: depends_on:
redis: redis: