docker-compostgresql을 시작할 때 "PostgreSQL Database directory..."

개요


한 번 시작한 후 리얼월드의 laavel 버전인 laavel-real word-example-app를 다시 시작하려고 시도할 때 다음과 같은 오류가 발생했습니다.
해결책을 기록하겠습니다.
https://github.com/f1amy/laravel-realworld-example-app
pgsql_1         |
pgsql_1         | PostgreSQL Database directory appears to contain a database; Skipping initialization
pgsql_1         |
pgsql_1         | 2021-10-09 22:42:10.252 UTC [1] FATAL:  database files are incompatible with server
pgsql_1         | 2021-10-09 22:42:10.252 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 14.0.

잘못된 전체 텍스트


Creating laravel-realworld-example-app_pgsql_1 ... done
Creating laravel-realworld-example-app_laravel.test_1 ... done
Attaching to laravel-realworld-example-app_pgsql_1, laravel-realworld-example-app_laravel.test_1
pgsql_1         |
pgsql_1         | PostgreSQL Database directory appears to contain a database; Skipping initialization
pgsql_1         |
pgsql_1         | 2021-10-09 22:42:10.252 UTC [1] FATAL:  database files are incompatible with server
pgsql_1         | 2021-10-09 22:42:10.252 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 14.0.
laravel-realworld-example-app_pgsql_1 exited with code 1
laravel.test_1  | 2021-10-09 22:42:13,292 INFO Set uid to user 0 succeeded
laravel.test_1  | 2021-10-09 22:42:13,295 INFO supervisord started with pid 16
laravel.test_1  | 2021-10-09 22:42:14,300 INFO spawned: 'php' with pid 17
laravel.test_1  | 2021-10-09 22:42:15,305 INFO success: php entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
laravel.test_1  | Starting Laravel development server: http://0.0.0.0:80
laravel.test_1  | [Sat Oct  9 22:42:17 2021] PHP 8.0.11 Development Server (http://0.0.0.0:80) started

해결책


4docker volume 삭제할 필요가 있는 것 같습니다.
> docker volume rm $(docker volume ls -qf dangling=true)
laravel-realworld-database

좋은 웹페이지 즐겨찾기