bin/docker/pim-initialize.sh
๋ฅผ ์คํํ๋ ๋์ ๋ค์ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
Akeneo PIM requirements check:
09:52:34 ERROR [console] Error thrown while running command "pim:installer:check-requirements --no-debug=1 --env=prod". Message: "SQLSTATE[HY000] [2002] No such file or directory" ["error" => PDOException { โฆ},"command" => "pim:installer:check-requirements --no-debug=1 --env=prod","message" => "SQLSTATE[HY000] [2002] No such file or directory"] []
In PimRequirements.php line 250:
SQLSTATE[HY000] [2002] No such file or directory
pim:installer:check-requirements [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
The command terminated with an error code: 2002.
์คํฌ๋ฆฝํธ๊ฐ ๊ณ์ ์คํ๋๊ณ ๋ค๋ฅธ ์ค๋ฅ๊ฐ ์์ ๋ฉ๋๋ค.
yarn run v1.6.0
warning package.json: No license field
$ yarn run sync && NODE_PATH=node_modules webpack --config $npm_package_config_source/webpack.config.js
warning package.json: No license field
$ NODE_PATH=node_modules node $npm_package_config_check --source=$npm_package_config_source
/srv/pim/vendor/akeneo/pim-community-dev/webpack.config.js:16
throw new Error(`The web/js/require-paths.js module does not exist - You need to run
^
Error: The web/js/require-paths.js module does not exist - You need to run
"bin/console pim:install" or "bin/console pim:installer:dump-require-paths" before
running webpack
at Object.<anonymous> (/srv/pim/vendor/akeneo/pim-community-dev/webpack.config.js:16:11)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at requireConfig (/srv/pim/node_modules/webpack/bin/convert-argv.js:97:18)
at /srv/pim/node_modules/webpack/bin/convert-argv.js:104:17
error Command failed with exit code 1.
๋ฌธ๋งฅ
์ด ๋ช
๋ น์ ์คํํ๋ฉด ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
docker-compose exec fpm bin/console --env=prod pim:install --force --symlink --clean
์ฌ๊ธฐ ์ ์ง์นจ์ ๋ฐ๋์ผ๋ฏ๋ก ๊ฐ๋จํ parameters.yml.dist
๋ฅผ parameters.yml
$์ ๋ณต์ฌํ๊ณ ๋ฌธ์์์ ๋งค๊ฐ๋ณ์๋ก ๋ณต์ฌํ๋ parameters_test.yml
๋ฅผ ๋ง๋ค์์ต๋๋ค.
PDO ์ฐ๊ฒฐ์ ์์ฑํ๋ ๋์ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
$parameters['parameters']
๋ฐฐ์ด์ ๋ด์ฉ์ ๋คํํ์ผ๋ฉฐ ๋ถ๋ช
ํ ๋ชจ๋ ๋งค๊ฐ ๋ณ์๊ฐ ์์ต๋๋ค.
๊ทธ๋์ ๋ฌธ์ ๋ docker-compose.yml
ํ์ผ์ ์๋ค๊ณ ์๊ฐํฉ๋๋ค.
ํ์ง๋ง Docker์ Akeneo๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ ์ด๋ฒ์ด ์ฒ์์ด๋ฏ๋ก ๋ ์ด์ ๋๋ฒ๊น ์ ์ํด ๋ฌด์์ ํด์ผ ํ ์ง ๋ชจ๋ฅด๊ฒ ์ต๋๋ค.
๋์์ ์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค... ๊ฐ์ฌํฉ๋๋ค!
์ข์, ๋๋ ์กฐ๋ช ์ ๊ฐ์ง๊ณ Google์์ "Docker SQLSTATE[HY000] [2002] No such file or directory"๋ฅผ ๊ฒ์ํ์ต๋๋ค.
์ฒซ ๋ฒ์งธ StackOverflow ๋ต๋ณ์ ์ด ๋ต๋ณ ๋๋ถ์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ต๋๋ค.
๋ฐ๋ผ์ docker-compose.yml
ํ์ผ์์์ ๊ฐ์ด mysql
๋ณ์นญ์ "mysql"์ด๋ฏ๋ก parameters.yml
param parameters.database_host
์ localhost
์์ mysql
๋ก ๋ณ๊ฒฝํ์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ข์, ๋๋ ์กฐ๋ช ์ ๊ฐ์ง๊ณ Google์์ "Docker SQLSTATE[HY000] [2002] No such file or directory"๋ฅผ ๊ฒ์ํ์ต๋๋ค.
์ฒซ ๋ฒ์งธ StackOverflow ๋ต๋ณ์ ์ด ๋ต๋ณ ๋๋ถ์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ต๋๋ค.
๋ฐ๋ผ์
docker-compose.yml
ํ์ผ์์์ ๊ฐ์ดmysql
๋ณ์นญ์ "mysql"์ด๋ฏ๋กparameters.yml
paramparameters.database_host
์localhost
์์mysql
๋ก ๋ณ๊ฒฝํ์ต๋๋ค.