Niet weggooien van images 2
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user