kool-dev / kool

From local development to the cloud: web apps development with containers made easy.

Home Page:https://kool.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Database (pgsql) service not running

infureal opened this issue · comments

Describe the bug

PostgreSQL container is not running on kool run setup via laravel preset.

Kool version and environment

Kool 1.13.2

PHP 8.0
PostgreSQL 13.0
Redis 6.0
JS npm

.env.example file:

DB_CONNECTION=pgsql
DB_HOST=database
DB_PORT=5432
DB_DATABASE=laravel
DB_USERNAME=infureal
DB_PASSWORD=pass

kool.yml file:

scripts:
  artisan: kool exec app php artisan
  composer: kool exec app composer
  node-setup:
  - kool run npm install
  - kool run npm run dev
  npm: kool docker kooldev/node:14 npm
  npx: kool docker kooldev/node:14 npx
  phpunit: kool exec app php ./bin/phpunit
  psql: kool exec -e PGPASSWORD=$DB_PASSWORD database psql -U $DB_USERNAME $DB_DATABASE
  reset:
  - kool run composer install
  - kool run artisan migrate:fresh --seed
  # - kool run node-setup
  setup:
  - cp .env.example .env
  - kool start
  - kool run composer install
  - kool run artisan key:generate
  # - kool run node-setup

kool status command output:

+----------+-------------+---------------------------------------------+----------------------------------+
| SERVICE  | RUNNING     | PORTS                                       | STATE                            |
+----------+-------------+---------------------------------------------+----------------------------------+
| app      | Running     | 0.0.0.0:80->80/tcp, :::80->80/tcp, 9000/tcp | Up 24 seconds                    |
| cache    | Running     | 6379/tcp                                    | Up 24 seconds (health: starting) |
| database | Not running |                                             | Exited (1) 24 seconds ago        |
+----------+-------------+---------------------------------------------+----------------------------------+

Sorry for this issue. I'm blind. Find this doc.
After kool stop --purge and running kool run setup again it works