diff --git a/.castor/database.php b/.castor/database.php new file mode 100644 index 0000000..eba7c1a --- /dev/null +++ b/.castor/database.php @@ -0,0 +1,15 @@ +title('Connecting to the PostgreSQL database'); + + docker_compose(['exec', 'postgres', 'psql', '-U', 'app', 'app'], context()->toInteractive()); +} diff --git a/castor.php b/castor.php index 6e21d31..0658e8b 100644 --- a/castor.php +++ b/castor.php @@ -2,7 +2,6 @@ use Castor\Attribute\AsTask; -use function Castor\context; use function Castor\guard_min_version; use function Castor\import; use function Castor\io; @@ -10,7 +9,6 @@ use function Castor\variable; use function docker\about; use function docker\build; -use function docker\docker_compose; use function docker\docker_compose_run; use function docker\generate_certificates; use function docker\up; @@ -119,11 +117,3 @@ function fixtures(): void // docker_compose_run('bin/console doctrine:fixture:load -n'); } - -#[AsTask(description: 'Connect to the PostgreSQL database', name: 'db:client', aliases: ['postgres', 'pg'])] -function postgres_client(): void -{ - io()->title('Connecting to the PostgreSQL database'); - - docker_compose(['exec', 'postgres', 'psql', '-U', 'app', 'app'], context()->toInteractive()); -}