Giter Site home page Giter Site logo

aliuosio / mage2.docker Goto Github PK

View Code? Open in Web Editor NEW
58.0 11.0 23.0 2.64 MB

Docker Stack with Magento 2 latest installer. Containers: Varnish, Nginx, PHP, Opensearch, MariaDB, Redis, Mailhog, RabbitMQ, Watchtower. One Stack for all Projects by adjusting .env file

License: MIT License

Dockerfile 7.95% Shell 74.34% VCL 17.71%
php docker docker-compose mailhog nginx containers redis elasticsearch magento2 docker-container

mage2.docker's People

Contributors

aliuosio avatar osioaliu avatar rakibabu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mage2.docker's Issues

Version is not in the correct format

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Several attempts to install, after changing quotes

Expected behavior
version (e.g "2.2" or "3.3")

Screenshots
jerteske@#:/var/lib/docker/mage2.docker$ sudo ./install.sh
.env File exists already
Absolute path to empty folder(fresh install) or running project (current: htdocs)
Domain Name (current: bizbloccenter.com)
Path to Project DB Dump or leave empty for fresh install (current: )
Which PHP 7 Version? (7.1, 7.2, 7.3) (current: 7.3)
Which MariaDB Version? (10.4.10, 10.5.2) (current: 10.4.10)
Create a login screen? (current: false)
enable Xdebug? (current: false)
Install Sample Data? (current: true)
Folder already exits
docker-compose down -v
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.

Desktop (please complete the following information):

  • OS: Debian 10
  • Docker: 1.17

Additional context
Add any other context about the problem here.

error by ssl letsencrypt

Describe the bug
sudo docker-compose run --rm letsencrypt letsencrypt certonly --webroot --email [email protected] --agree-tos -w /var/www/letsencrypt -d nanamarkt.de
WARNING: The PWD variable is not set. Defaulting to a blank string.
ERROR: Configuration for volume app_data specifies "device" driver_opt /htdocs, but a volume with the same name uses a different "device" driver_opt (/www/wwwroot/nanamarkt/htdocs). If you wish to use the new configuration, please remove the existing volume "nanamarkt_app_data" first:
$ docker volume rm nanamarkt_app_data

To Reproduce
Steps to reproduce the behavior:

  1. after install , i try to web nanamarkt.de, but i got page 404, und without SSL.
  2. i try use , sudo docker-compose run --rm letsencrypt letsencrypt certonly --webroot --email [email protected] --agree-tos -w /var/www/letsencrypt -d nanamarkt.de
    i got the error
    WARNING: The PWD variable is not set. Defaulting to a blank string.
    ERROR: Configuration for volume app_data specifies "device" driver_opt /htdocs, but a volume with the same name uses a different "device" driver_opt (/www/wwwroot/nanamarkt/htdocs). If you wish to use the new configuration, please remove the existing volume "nanamarkt_app_data" first:
    $ docker volume rm nanamarkt_app_data
    ps. i used the default.conf und default_ssl.conf for the nginx.

Desktop (please complete the following information):

  • OS: [Ubuntu 18.04]
  • Browser [chrome and safari]

Additional context
if i used

  1. sudo docker-compose down -v
    2.sudo docker-compose up -d
    i will got the error from php container
    ERROR: for nanamarkt_php_7.3 Cannot create container for service php: failed toCreating nanamarkt_redis_pagespeed ... done
    ata, flags: 0x1000: no such file or directory

ERROR: for php Cannot create container for service php: failed to mount local volume: mount /htdocs:/var/lib/docker/volumes/nanamarkt_app_data/_data, flags: 0x1000: no such file or directory
ERROR: Encountered errors while bringing up the project.

thank you very much

best regards
lee

gem install docker-sync issue

Hi, I really like the way you create this docker.

i try to install it but has this erro, i run macos catalina

gem install docker-sync;

ERROR: While executing gem ... (URI::InvalidURIError)
URI must be ascii only "?gems=docker-sync\u00CC"

Production deployment

Hi.. We would like to use this repo for production with Traefik as reverse proxy and additional resources like Rabbitmq. As per your assessment is this suitable for production deployments ?
Our plan is to test in local environment and then standalone vps with docker.

Error install and add multiple websites

Hello Aliuosio,

Thanks in advance for your work on the Docker - Magento 2 stack.

I have a few questions though. How can I add a second site via the same project using the conf that you provide via the .env file and nginx?

One site: SHOPURI=magento1.local
Two site: SHOPURI 2 ? =magento2.local

During installation, being on Ubuntu I also have a problem with compose. I didn't touch anything in the conf except the .env file where I set

SHOPURI =magento1.local
COMPOSE_PROJECT_NAME and NAMESPACE to : magento-246

file_put_contents(/home/www-data/.composer/auth.json): Failed to open stream: Permission denied
I'm a bit stuck on the project I'm working on, can you help me with the various topics,
Regards,

Install on Catalina Stops a Gem

Describe the bug
install stops at gem install docker-sync.

To Reproduce
Steps to reproduce the behavior:
Brand new install of docker on macOS Catalina

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
gem install docker-sync;
ERROR: While executing gem ... (URI::InvalidURIError)
URI must be ascii only "?gems=docker-sync\u00CC"

Desktop (please complete the following information):

  • OS: macOS Catalina

SQLSTATE[HY000] [2006] MySQL server has gone away In InstallCommand.php line 264: Parameter validation failed

Describe the bug
SQLSTATE[HY000] [2006] MySQL server has gone away

In InstallCommand.php line 264:

Parameter validation failed
can not connect the MySQL. see the error info

To Reproduce
Steps to reproduce the behavior:

  1. i used the ./install.sh
  2. by the mangeto install ,i got the error as above. i try change the Host name to localhost or mysql ,or container name from sql,but it not work.

thanks

best regards
lee

OSX issues with install.sh file

I'm getting errors when trying to use the install script on my Mac OSX. I don't run the script under root so that might be throwing errors. Sometimes when I change the script from ${1} to root that command will work, but then error somewhere else.

For example,
I had to change

chown -R $2:$2 $1;
to
chown -R $(whoami):$(groups $(whoami) | cut -d' ' -f1) $1;

in the workDirCreate() function

I've also got certain commands like

docker exec -it $2 composer global require hirak/prestissimo
changed to
docker exec -it -u root $2 composer global require hirak/prestissimo;

and that will work as well.

Expected behavior
Run ./install script without error

Desktop (please complete the following information):

  • Mac OS 10.15.6 Catalina

Additional context
My first error was about illegal group name
https://stackoverflow.com/questions/15980675/chown-illegal-group-name-mac-os-x

Which I changed to chown -R $(whoami):$(groups $(whoami) | cut -d' ' -f1) $1; because my group is "staff" under my mac account.

It might all be fixed if I just run it under linux, but I felt this was something I should bring to everyone's attention.

Varnish not working

Hello,

Thank you for you'r work, it working fine with Magento 2.4.6-p2.
So, i need to work with Varnish with this project.

After several tests on my side, the Varnish container is running well and listening to port 0.0.0.0:80->80/tcp, :::80->80/tcp, 8443/tcp, I have set up the VLC with the container information and moved the health_check file to the root. This doesn't work, I can't figure it out.
Here's the only thing I can visualize with varnishlog.

varnishlog -g raw -i Backend_health
Backend_health - default Still sick -------- 0 5 10 0.000000 0.000000 "Open error 111 (Connection refused)"

backend default {
.host = "magento246_nginx";
.port = "8080";
.first_byte_timeout = 600s;
.probe = {
.url = "/health_check.php";
.timeout = 2s;
.interval = 5s;
.window = 10;
.threshold = 5;
}
}

acl purge {
"127.0.0.1";
"magento246_nginx";
}

Can you please help me?

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed

Expected behavior
Mage2_db was not active at time Magneto was attempting to install

2020-04-28 05:50:16+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.10+maria~bionic started.
2020-04-28 05:50:16+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
command was: mysqld -d --verbose --help --log-bin-index=/tmp/tmp.jyIaphWNlD
2020-04-28 5:50:16 0 [Warning] option 'table_definition_cache': unsigned value 18446744073709551615 adjusted to 2097152
2020-04-28 5:50:16 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-04-28 5:50:16 0 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
2020-04-28 5:50:16 0 [ERROR] mysqld: unknown option '-d'
2020-04-28 5:50:16 0 [ERROR] Aborting

Screenshots
jerteske@bizbloccenter:/var/www/mage2.docker$ docker exec -it -u root mage2_php_7.3 bin/magento setup:install --db-host=db --db-name=mage2 --db-user=mage2 --db-password=mage2 --backend-frontname=admin --base-url=http://bizbloccenter.com/ --base-url-secure=https://bizbloccenter.com/ --use-secure=1 --use-secure-admin=1 --language=de_DE --timezone=Europe/Berlin --currency=EUR --admin-lastname=mage2_admin --admin-firstname=mage2_admin --admin-email=[email protected] --admin-user=mage2_admin --admin-password=mage2_admin123#T --cleanup-database --use-rewrites=1;
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name does not resolve

In InstallCommand.php line 264:

Parameter validation failed

Desktop (please complete the following information):

  • OS: Debian 10
  • Docker: 19.03.8
  • Docker Compose: 1.25

Bug - Missing sync_userid in docker-sync.yml

Describe the bug
First of all, I was not aware of the docker sync, so maybe this nice to append in the readme.

When installing ./install.sh the setup fails due an error writing the vendor dir. This causes to exit the setup and not installing any vendor packages. I researched the docs of docker-sync and came found the sync_userid and sync_groupid id params. When I set the params to 1000 like this:

sync_userid: 1000
sync_groupid: 1000

The error disappeared.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the docs for installation
  2. When installing, the setup fails on installing composer packages.

Expected behavior
No errors on install.

Desktop (please complete the following information):

  • OS: Mac OS
  • Version Mojave 10.14.6

Unable to complete magento installation

Describe the bug
when I run this command ./install.sh

it reaches here and it failed
[Progress: 2 / 994]
Enabling Maintenance Mode...

In Abstract.php line 144:

SQLSTATE[HY000] [2002] No such file or directory

In Abstract.php line 128:

SQLSTATE[HY000] [2002] No such file or directory

I'm using MAC 10.15.2

Install issue.

Describe the bug
A clear and concise description of what the bug is.

Successfully installed docker-sync-0.5.14 Parsing documentation for docker-sync-0.5.14 Done installing documentation for docker-sync after 0 seconds 1 gem installed source ~/.bash_profile

I'm using OSX. It always logout after the above step.

Feature - split nginx conf files into smaller chunks

Hi @aliuosio ,

Thanks for sharing this awesome docker build. I saw a huge chunk of locations in the nginx default.conf. Can we split this into smaller chunks so we can manage updates in the magento nginx file?

I propose a structure Serverpilot has:

include /etc/nginx/conf/[subdir]*.nonssl_conf;
include /etc/nginx/conf/[subdir]/*.conf;

This way we can make multiple files:

  • Nginx pagespeed
  • SSL
  • Default Magento Nginx
  • Cloudflare conf
  • etc.....

Happy to hear your thoughts on this.

Raki

Admin redirect loop

Describe the bug
On Linux Systems there is a redirect loop

To Reproduce
Steps to reproduce the behavior:
run install.sh

Expected behavior
Redirect Loop

Desktop:

  • OS: Linux
  • Chrome, Firefox

er CONNECTION_REFUSED error

Hello,
I use this docker project, but i have some problems.
in the .env file SHOPURI= I replaced with my website address, but it constantly resolves to http://localhost
My website: http://system.oyuncustore.com.tr
IP: 185.244.30.88
where could i go wrong
I request your help in this matter.

my mother tongue is turkish so i don't know much english, sorry if i didn't explain well

SSL Disable on OSX

Describe the bug
On OSX SSL is set to OFF.
So the URL set in Magento 2 core_config_data should use http on secure and none secure weburl.
The force HTTPS should be set to 0 for frontend and backend

To Reproduce
Run install.sh on OSX

Expected behavior
So the URL set in Magento 2 core_config_data should use http on secure and none secure weburl.
The force HTTPS should be set to 0 for frontend and backend

Desktop (please complete the following information):

  • OS: OSX

Installation error

Describe the bug
User does not appear to be passed correctly. Here are 2 examples (there may be more)

  1. During install the following error occurs
    docker exec -it chown -R userx:userx /home/userx;

docker exec -it -u userx mage_php_7.4 composer global require hirak/prestissimo;

Changed current directory to /home/osio/.composer
[ErrorException]
file_put_contents(./composer.json): failed to open stream: Permission denied

I created a work around of this by commenting out the following line in install.sh
docker exec -it -u "$1" "$2" composer global require hirak/prestissimo

  1. After installation completed on a remote linux server, there was an nginx 404 error.
    After inspecting /etc/nginx/conf.d/default.conf
    set $MAGE_ROOT /home/osio/html;
    presumably it should be
    set $MAGE_ROOT /home/userx/html;

To Reproduce
run install.sh

Expected behavior
as detailed above

Server running Ubuntu 20.04 LTS

Error ./install.sh on ubuntu

ERROR: for mage2_php_7.3 Cannot create container for service php: failed to mount local volume: mount magento:/var
/lib/docker/volumes/mage2docker_app_data/_data, flags: 0x1000: no such file or directory
ERROR: for php Cannot create container for service php: failed to mount local volume: mount magento:/var/lib/docke
r/volumes/mage2docker_app_data/_data, flags: 0x1000: no such file or directory
ERROR: Encountered errors while bringing up the project..

SSL error on chrome / disable SSL mode

Hi,

Hope you are all well !

I wanted to deploy locally your repository and after executing

./install.sh

My browser (Chrome/MacOSX) displays:

Your connection is not private
Attackers might be trying to steal your information from mage2.local.com (for example, passwords, messages or credit cards). Learn more
NET::ERR_CERT_INVALID

Ps. mage2.local.com was changed as letsencrypt triggered it could not validate the certificate as no valid TLD.

My questions:

  • Can you describe more how to deploy it on MacOSX ?
  • Can you tell me how to disable the SSL mode for now ?

Thanks in advance for your insights an inputs.

Cheers,
X

file_put_contents(./composer.json): failed to open stream: Permission denied

Hi,

Hope you are all well !

I tested on linux the ./install.sh script and I have the following error:

docker-compose up -d
Creating network "mage2docker_default" with the default driver
Creating mage2_mailhog         ... done
Creating mage2_host-settings   ... done
Creating mage2_redis_pagespeed ... done
Creating mage2_redis           ... done
Creating mage2_letsencrypt     ... done
Creating mage2_db              ... done
Creating mage2_elasticsearch   ... done
Creating mage2_php             ... done
Creating mage2_nginx           ... done
docker exec -it -u ubuntu mage2_php composer global require hirak/prestissimo;
Changed current directory to /home/ubuntu/.composer

                                                                                
  [ErrorException]                                                              
  file_put_contents(./composer.json): failed to open stream: Permission denied  
                                                                                

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

Any ideas how to solve it ?

Cheers,
X

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.