docker-compostgresql을 시작할 때 "PostgreSQL Database directory..."
개요
한 번 시작한 후 리얼월드의 laavel 버전인 laavel-real word-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
해결책
4
docker volume
삭제할 필요가 있는 것 같습니다.> docker volume rm $(docker volume ls -qf dangling=true)
laravel-realworld-database
Reference
이 문제에 관하여(docker-compostgresql을 시작할 때 "PostgreSQL Database directory..."), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://zenn.dev/msksgm/articles/20211205-docker-compose-postgresql-volume-error텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)