Skip to content

Instantly share code, notes, and snippets.

@stefanpejcic
Last active March 26, 2024 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanpejcic/afa561ea1e1e03699b93046d4752969d to your computer and use it in GitHub Desktop.
Save stefanpejcic/afa561ea1e1e03699b93046d4752969d to your computer and use it in GitHub Desktop.
Install Magento2.4 on Ubuntu docker container behind Nginx rev.proxy
NOTICE: You are seeing this message because you have apache2 package installed.
PHP extension php8.1-imagick is now successfully installed.
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Err:2 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
403 Forbidden [IP: 34.120.127.130 443]
Hit:3 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:4 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists...
E: Failed to fetch https://artifacts.elastic.co/packages/7.x/apt/dists/stable/InRelease 403 Forbidden [IP: 34.120.127.130 443]
E: The repository 'https://artifacts.elastic.co/packages/7.x/apt stable InRelease' is no longer signed.
DOMENI
https://gri.my/blog/setting-up-magento-on-docker-with-nginx-as-reverse-proxy/
[Progress: 1330 / 1331]
Write installation date...
[Progress: 1331 / 1331]
[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_1lo5td
Nothing to import.
ENABLE DEV MODE
php bin/magento deploy:mode:set developer
BUF SIZE
https://www.cyberciti.biz/faq/nginx-upstream-sent-too-big-header-while-reading-response-header-from-upstream/
chown na userg
TREBA
WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
limit 1g elastics
https://stackoverflow.com/a/40333263/11575408
composer setup
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .
Nginx buffer limits increase
php max exec limits
install komanda
bin/magento setup:install \
--base-url=https://DOMEN/magento/ \
--db-host=localhost \
--db-name=ksafet_magento \
--db-user=ksafet_magento \
--db-password=ksafet_magento \
--admin-firstname=admin \
--admin-lastname=admin \
--admin-email=admin@admin.com \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=EUR \
--timezone=Europe/Belgrade \
--use-rewrites=1
--elasticsearch-host=127.0.0.1 --elasticsearch-port=9200 --search-engine=elasticsearch7
elastic gui
phpfpm limiti
cron
* * * * * php /home/ksafet/DOMEN/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /home/ksafet/DOMEN/var/log/magento.cron.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment