Niet weggooien van images 2

This commit is contained in:
Frank
2026-01-11 15:35:10 +01:00
parent 3b98e8650b
commit bc4f7a8c79
8 changed files with 47 additions and 48 deletions

View File

@@ -18,17 +18,17 @@ set -euo pipefail
ROOT_DIR=$(cd "$(dirname "$0")"/.. && pwd)
DOCKER_DIR="$ROOT_DIR/docker"
# Determine the docker-compose command
if command -v docker-compose >/dev/null 2>&1; then
DOCKER_COMPOSE="docker-compose"
elif docker compose version >/dev/null 2>&1; then
if docker compose version >/dev/null 2>&1; then
DOCKER_COMPOSE="docker compose"
elif command -v docker-compose >/dev/null 2>&1; then
DOCKER_COMPOSE="docker-compose"
else
echo "Error: Neither 'docker-compose' nor 'docker compose' was found. Please install Docker Compose." >&2
exit 1
fi
# Helper to run docker compose from the project root
dc() { (cd "$ROOT_DIR" && $DOCKER_COMPOSE "$@"); }
# Helper to run docker compose from the docker directory
dc() { (cd "$DOCKER_DIR" && $DOCKER_COMPOSE -f compose.yaml -f compose.override.yaml --env-file ../.env "$@"); }
REBUILD=1
RECREATE=0
@@ -132,12 +132,12 @@ Open the app: $APP_URL
Mailpit (dev): $MAILPIT_URL
Common commands:
(cd "$ROOT_DIR" && $DOCKER_COMPOSE logs -f nginx)
(cd "$ROOT_DIR" && $DOCKER_COMPOSE logs -f php)
(cd "$ROOT_DIR" && $DOCKER_COMPOSE logs -f php-worker)
(cd "$ROOT_DIR" && $DOCKER_COMPOSE exec php bash)
(cd "$ROOT_DIR" && $DOCKER_COMPOSE exec php npm run watch)
(cd "$ROOT_DIR" && $DOCKER_COMPOSE down)
(cd "$DOCKER_DIR" && $DOCKER_COMPOSE logs -f nginx)
(cd "$DOCKER_DIR" && $DOCKER_COMPOSE logs -f php)
(cd "$DOCKER_DIR" && $DOCKER_COMPOSE logs -f php-worker)
(cd "$DOCKER_DIR" && $DOCKER_COMPOSE exec php bash)
(cd "$DOCKER_DIR" && $DOCKER_COMPOSE exec php npm run watch)
(cd "$DOCKER_DIR" && $DOCKER_COMPOSE down)
You can re-run this script any time. Use --no-build to skip rebuilding images.
EOT