├── .gitignore ├── Dockerfile ├── Documentation ├── adding-keys-to-container.md ├── debugging-with-xdebug-in-phpstorm.md ├── importing-a-shop.md ├── inspecting-emails.md ├── magento-1-install.md ├── starting-the-container.md └── switching-php-versions.md ├── README.md ├── examples ├── linux_development │ ├── Dockerfile │ ├── README.md │ └── https.dummytag.hypernode.io.conf └── osx_development │ ├── .gitignore │ ├── README.md │ ├── docker-compose.yml │ ├── docker-sync.yml │ └── magento │ └── index.php ├── index.html └── keys ├── README.md ├── insecure_key └── insecure_key.pub /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | getip.php 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.hypernode.com/byteinternet/hypernode-docker:latest 2 | MAINTAINER vdloo 3 | -------------------------------------------------------------------------------- /Documentation/adding-keys-to-container.md: -------------------------------------------------------------------------------- 1 | # Adding keys to container 2 | 3 | To create a Docker instance of `hypernode-docker` with your own keys, create a directory with your public key in it and a Dockerfile. 4 | 5 | ```bash 6 | $ ls 7 | key.pub Dockerfile 8 | $ cat Dockerfile 9 | FROM docker.hypernode.com/byteinternet/hypernode-docker:latest 10 | MAINTAINER yourname 11 | 12 | ADD key.pub /tmp/key.pub 13 | RUN cat /tmp/key.pub > /root/.ssh/authorized_keys && cat /tmp/key.pub > /data/web/.ssh/authorized_keys && rm -f /tmp/deployment.pub 14 | ``` 15 | 16 | Then build the Docker with: 17 | ```bash 18 | docker build -t hypernode-with-keys . 19 | ``` 20 | 21 | And once finished, start the Docker with: 22 | ``` 23 | docker run hypernode-with-keys 24 | ``` 25 | 26 | Note: remember that you will also need to change the default `app` and `root` user passwords if you're looking to create a secure environment. 27 | -------------------------------------------------------------------------------- /Documentation/debugging-with-xdebug-in-phpstorm.md: -------------------------------------------------------------------------------- 1 | Debugging with Xdebug in PhpStorm 2 | ================================= 3 | 4 | [Xdebug](https://xdebug.org/) is a PHP debugging tool. You can use `php-xdebug` in the `hypernode-docker` to debug the PHP code of your shop. This is a step by step guide to set up the debugger. 5 | 6 | 7 | ## Get PhpStorm 8 | 9 | If you don't already have PhpStorm, you can go get it [here](https://www.jetbrains.com/phpstorm/). 10 | 11 | 12 | ## Get a hypernode-docker up and running 13 | 14 | To start up the `hypernode-docker` you can do this: 15 | ``` 16 | docker pull docker.hypernode.com/byteinternet/hypernode-docker:latest 17 | docker run docker.hypernode.com/byteinternet/hypernode-docker:latest 18 | ``` 19 | 20 | Keep this open in a different shell and note the IP address. 21 | 22 | 23 | ## Set up php-xdebug in the docker 24 | 25 | In another shell, log in to the docker as root. 26 | ``` 27 | # The password should be in the output from the docker run command 28 | ssh root@172.17.0.2 29 | ``` 30 | 31 | Inside the docker, install php-xdebug. 32 | ``` 33 | apt-get install php-xdebug 34 | ``` 35 | 36 | Or if you are running PHP 8.0 you need to install: 37 | ``` 38 | apt-get install php8.0-xdebug 39 | ``` 40 | 41 | And for PHP 8.1: 42 | ``` 43 | apt-get install php8.1-xdebug 44 | ``` 45 | 46 | Note: if you're doing this manually all the time consider making a Dockerfile based on `hypernode-docker` that does this as part of the image. 47 | 48 | Enable `php-xdebug` for `php-fpm` 49 | ``` 50 | # This file should exist and contain only the line: zend_extension=xdebug.so 51 | vim /etc/php/7.1/fpm/conf.d/20-xdebug.ini 52 | # In this file put these extra lines: 53 | xdebug.remote_enable=1 54 | xdebug.remote_port="9005" 55 | xdebug.remote_host="127.0.0.1" 56 | ``` 57 | 58 | Next, restart the services with `bash /etc/my_init.d/60_restart_services.sh` 59 | 60 | If you also want to enable xdebug for cli see the `/etc/php//cli` dir 61 | 62 | 63 | ## Mount the remote application filesystem 64 | 65 | In order to set breakpoints PhpStorm needs to have access to the filesystem of the Docker container. You can set this up in many different ways (like Docker volumes). In this example sshfs is used. 66 | 67 | Make sure [sshfs installed and configured](https://www.linode.com/docs/networking/ssh/using-sshfs-on-linux/): 68 | ``` 69 | # On Ubuntu / Debian as root 70 | apt-get install sshfs 71 | groupadd fuse || /bin/true 72 | usermod -a -G fuse 73 | ``` 74 | 75 | Create the mount directory: 76 | ``` 77 | mkdir -p /mnt/sshfs 78 | ``` 79 | 80 | Mount the webroot of the docker as the `app` user: 81 | ``` 82 | # This has the same password as root 83 | sshfs -o allow_other app@172.17.0.2:/data/web/public /mnt/sshfs 84 | ``` 85 | 86 | Note that in case of Magento 2 and Shopware 6 you might want to mount `/data/web/magento2` instead for example as that contains the web root. In Magento 1 the webroot generally is the whole application. 87 | 88 | Now if you go to `/mnt/sshfs` on your computer you should be able to see and edit the files that are served by the Docker on `172.17.0.2`. 89 | 90 | If you have no application you can create a PHP file like so for testing: 91 | ``` 92 | $ cat index.php 93 | Settings` and navigate to `Languages & Frameworks -> PHP -> Debug` and configure these settings: 103 | ``` 104 | Disabled: Ignore external connections through unregistered server configurations 105 | Disabled: Break at first line in PHP scripts 106 | Debug port: 9000 107 | Enabled: Can accept external connections 108 | Disabled: Force break at first line when no path mapping specified 109 | Disabled: Force break at first line when a script is outside the project 110 | Enabled: Automatically detect IDE IP: mostly the default here is OK but make sure it at least includes 127.0.0.1 111 | ``` 112 | 113 | Next, click `Run -> Start Listening For PHP Debug Connections` 114 | 115 | On your computer a new port should now be bound. You can verify this like so: 116 | ``` 117 | # netstat -tulpn | grep 9000 118 | tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN 25434/java 119 | ``` 120 | 121 | ## Forward the PhpStorm port to the Docker 122 | 123 | As the next step we need to forward this port that PhpStorm has opened up to the Docker so that the `php-fpm` service inside the Docker can relay the debug information to the PhpStorm IDE. In another shell do the following: 124 | 125 | ``` 126 | ssh root@172.17.0.2 -R 127.0.0.1:9005:127.0.0.1:9000 127 | ``` 128 | 129 | This will forward the TCP port 9000 on your desktop / laptop to port 9000 in the hypernode-docker container. You can again verify if this worked: 130 | ``` 131 | # The 9005 port should now be bound on 127.0.0.1 in the Docker 132 | root@3023654a6956 ~ # netstat -tulpn | grep 9005 133 | tcp 0 0 127.0.0.1:9005 0.0.0.0:* LISTEN 5904/6 134 | 135 | # And the process doing that is our SSH connection 136 | root@3023654a6956 ~ # ps auxf | grep 5904 137 | postfix 1200 0.0 0.0 80704 5904 ? S 09:55 0:00 \_ tlsmgr -l -t unix -u -c 138 | root 5904 0.0 0.0 97088 7632 ? Ss 11:06 0:00 | \_ sshd: root@pts/6 139 | root 5973 0.0 0.0 20656 932 pts/6 S+ 11:07 0:00 | \_ grep 5904 140 | ``` 141 | 142 | Keep in mind that if you close that SSH session the connection will be gone! 143 | 144 | ## Start the debug process 145 | 146 | In your browser go to http://172.17.0.2/. If you followed the `phpinfo` example above you should see the phpinfo page displaying the version information and such. 147 | 148 | Next, in PhpStorm go to this `index.php` and click in the gutter near the line number. This will create a red ball next to the number and light up the line. This is a breakpoint. Execution will halt here when the page is loaded and you will get a chance to look around in the PHP [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) at this point in the process. 149 | 150 | In the browser with http://172.17.0.2/ open click the Debug extension and enable `Debug`. If you now reload the page a popup should appear in PhpStorm. After configuring the path mapping you can interact with the console. 151 | 152 | ## Other resources 153 | 154 | Check out this link for more info about phpstorm and xdebug: https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html 155 | -------------------------------------------------------------------------------- /Documentation/importing-a-shop.md: -------------------------------------------------------------------------------- 1 | # Importing a Magento shop 2 | 3 | 1. Add a hosts entry for the Docker 4 | ```bash 5 | grep -q hypernode.hypernode.local /etc/hosts || echo "172.17.0.2 hypernode.hypernode.local" >> /etc/hosts 6 | ``` 7 | 8 | 1. Start an SSH agent and add your key 9 | ```bash 10 | eval $(ssh-agent -s) 11 | ssh-add # Add your keys 12 | ``` 13 | 14 | 1. Log in to the hypernode-docker container 15 | ```bash 16 | # Log in with SSH agent forwarding 17 | # The default password is 'insecure_docker_ssh_password', or use the insecure key 18 | ssh -A root@172.17.0.2 19 | ``` 20 | 21 | 1. Double-check you are in the Docker environment and not the real Hypernode 22 | ```bash 23 | # This file does not exist on real Hypernodes 24 | app@e4b7d958e69c:~$ ls /etc/hypernode/is_docker 25 | /etc/hypernode/is_docker 26 | ``` 27 | 28 | 1. Run the [hypernode-importer](https://support.hypernode.com/knowledgebase/migrating-your-magento-to-hypernode/#Option_2_Migrate_your_shop_via_Shell_using_hypernode-importer_8211_Magento_1_2) to import a shop from a real Hypernode 29 | ```bash 30 | hypernode-importer --host vdloo.hypernode.io --path /data/web/public --set-default-url 31 | ``` 32 | 33 | 1. Point your browser to the importer shop 34 | 35 | Go to http://hypernode.hypernode.local/ 36 | 37 | -------------------------------------------------------------------------------- /Documentation/inspecting-emails.md: -------------------------------------------------------------------------------- 1 | # Inspecting emails sent from the Docker 2 | 3 | Like in the [hypernode-vagrant](https://github.com/ByteInternet/hypernode-vagrant#mail) project, all emails are caught and redirected to a [MailHog](https://github.com/mailhog/MailHog) instance. You can visit the mailhog web interface on port `8025`. So for example, if the IP of your container is `172.17.0.2` you would be able to access MailHog on [http://172.17.0.2:8025/](http://172.17.0.2:8025/). 4 | 5 | Alternatively you could set up a hosts entry like so on the host (not in the Docker): 6 | ```bash 7 | grep -q hypernode.hypernode.local /etc/hosts || echo "172.17.0.2 hypernode.hypernode.local" >> /etc/hosts 8 | ``` 9 | 10 | And then visit the MailHog instance on [http://hypernode.hypernode.local:8025](http://hypernode.hypernode.local:8025). 11 | -------------------------------------------------------------------------------- /Documentation/magento-1-install.md: -------------------------------------------------------------------------------- 1 | # Installing Magento 1 2 | 3 | Make sure you have a hosts entry set up: 4 | ```bash 5 | # Note that you need root to write to /etc/hosts 6 | grep -q hypernode.hypernode.local /etc/hosts || echo "172.17.0.2 hypernode.hypernode.local" >> /etc/hosts 7 | ``` 8 | 9 | Switch to a Magento 1 compatible PHP version 10 | ```bash 11 | # Log in as root 12 | $ ssh root@172.17.0.2 -i keys/insecure_key 13 | # Change the PHP service version to 7.0 14 | sed -i 's/7\.1/7.0/g' /etc/my_init.d/60_restart_services.sh 15 | # Update PHP symlinks 16 | update-alternatives --set php $(which php7.0) 17 | # Restart services 18 | bash /etc/my_init.d/60_restart_services.sh 19 | # Log out of the Docker 20 | exit 21 | ``` 22 | 23 | Log in to the container as the app user: 24 | ```bash 25 | $ ssh app@172.17.0.2 -i keys/insecure_key 26 | ``` 27 | 28 | Remove any Magento 2 specific NGINX configuration: 29 | ```bash 30 | rm -rf /data/web/nginx/magento2.flag 31 | ``` 32 | 33 | Create a new database: 34 | ```bash 35 | echo 'create database magento;' | mysql 36 | ``` 37 | 38 | Install Magento with [n98-magerun](https://github.com/netz98/n98-magerun): 39 | ```bash 40 | # Write the n98-magerun config file: 41 | cat << EOF > /data/web/.n98-magerun.yaml 42 | commands: 43 | N98\Magento\Command\Installer\InstallCommand: 44 | installation: 45 | defaults: 46 | currency: EUR 47 | locale: nl_NL 48 | timezone: UTC 49 | use_secure: no 50 | use_rewrites: yes 51 | session_save: files 52 | admin_username: admin 53 | admin_firstname: Firstname 54 | admin_lastname: Lastname 55 | admin_password: thisisanexamplePassword123456 56 | admin_frontname: example 57 | admin_email: example@example.com 58 | encryption_key: 59 | installation_folder: /data/web/public 60 | 61 | magento-packages: 62 | - name: byte-mag-mirror-latest 63 | version: 1.9 64 | dist: 65 | url: http://magento.mirror.hypernode.com/releases/magento-latest.tar.gz 66 | type: tar 67 | extra: 68 | sample-data: sample-data-1.9.1.0 69 | EOF 70 | 71 | # Install Magento 1 72 | php -d memory_limit=1024M /usr/local/bin/n98-magerun install --magentoVersionByName=byte-mag-mirror-latest --dbHost=127.0.0.1 --dbUser=app --dbPass=$(cat /data/web/.my.cnf | grep pass | awk '{print$3}') --dbName=magento --installSampleData=no --useDefaultConfigParams=yes --installationFolder=/data/web/public --baseUrl=http://hypernode.hypernode.local --replaceHtaccessFile=no --no-interaction 73 | ``` 74 | -------------------------------------------------------------------------------- /Documentation/starting-the-container.md: -------------------------------------------------------------------------------- 1 | # Starting the container 2 | 3 | ## Running the container in the foreground 4 | 5 | To start the container in the foreground, run the following command: 6 | 7 | ```bash 8 | $ docker pull docker.hypernode.com/byteinternet/hypernode-docker:latest 9 | $ docker run docker.hypernode.com/byteinternet/hypernode-docker:latest 10 | *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh... 11 | *** Running /etc/my_init.d/10_login_instructions.sh... 12 | _ 13 | /\ /\_ _ _ __ ___ _ __ _ __ ___ __| | ___ 14 | / /_/ / | | | '_ \ / _ \ '__| '_ \ / _ \ / _` |/ _ \ 15 | / __ /| |_| | |_) | __/ | | | | | (_) | (_| | __/ 16 | \/ /_/ \__, | .__/ \___|_| |_| |_|\___/ \__,_|\___| 17 | |___/|_| 18 | 19 | Host/IP: xxxxx-dummytag-docker.nodes.hypernode.io (172.17.0.3) 20 | Account_id: 666 21 | Release: release-5278-28-ga9d3844 @ 2018-06-05 12:56:34 UTC 22 | 23 | Handy commands (more at http://support.hypernode.com): 24 | 25 | livefpm (see live PHP status) 26 | tal | pnl (follow live requests) 27 | 28 | hypernode-importer (import a Magento shop) 29 | hypernode-image-optimizer (reduce image size) 30 | hypernode-ftp (manage FTP accounts) 31 | 32 | magerun list (many useful extensions) 33 | 34 | ------------------------------------------------------------------------------ 35 | The SSH daemon will be up in a couple of seconds, you can login with: ssh -A app@172.17.0.3 36 | *** Running /etc/my_init.d/50_copy_key.sh... 37 | *** Running /etc/my_init.d/50_fix_mailname.sh... 38 | *** Running /etc/my_init.d/51_postfix.sh... 39 | * Starting Postfix Mail Transport Agent postfix 40 | ...done. 41 | *** Running /etc/my_init.d/60_restart_services.sh... 42 | Killing old Hypernode services 43 | Killing any old NGINX service 44 | Killing any old Redis service 45 | Killing any old PHP-FPM service 46 | Killing any old MySQL service 47 | Killing any old Mailhog service 48 | Killing any old Varnish service 49 | Giving any old services 5 seconds to stop.. 50 | No Sockets found in /var/run/screen/S-root. 51 | 52 | Starting new detached hypernode services. See screen -x 53 | Starting NGINX 54 | Starting Redis 55 | Starting PHP 56 | Starting MySQL 57 | Starting Mailhog 58 | Starting Varnish 59 | Giving the new services a couple of seconds to start.. 60 | hypernode-docker status: everything ok 61 | *** Running /etc/rc.local... 62 | *** Booting runit daemon... 63 | *** Runit started as PID 312 64 | ``` 65 | 66 | You can now log in with SSH using the IP address seen in the output. 67 | 68 | ## Running the container in the background 69 | 70 | To start the container in the background, run the following command: 71 | ```bash 72 | $ docker run -d docker.hypernode.com/byteinternet/hypernode-docker:latest 73 | 36532b58822cf27f74234f6afc01db21fca15b480bf43634ae725db35047dc5a 74 | ``` 75 | 76 | The IP address of the container can then be found with: 77 | ```bash 78 | $ docker inspect -f '{{ .NetworkSettings.IPAddress }}' 36532b58822cf27f74234f6afc01db21fca15b480bf43634ae725db35047dc5a 79 | 172.17.0.3 80 | ``` 81 | 82 | You can view the logs with `docker logs` 83 | ```bash 84 | $ docker logs 36532b58822cf27f74234f6afc01db21fca15b480bf43634ae725db35047dc5a 85 | *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh... 86 | *** Running /etc/my_init.d/10_login_instructions.sh... 87 | _ 88 | /\ /\_ _ _ __ ___ _ __ _ __ ___ __| | ___ 89 | / /_/ / | | | '_ \ / _ \ '__| '_ \ / _ \ / _` |/ _ \ 90 | / __ /| |_| | |_) | __/ | | | | | (_) | (_| | __/ 91 | \/ /_/ \__, | .__/ \___|_| |_| |_|\___/ \__,_|\___| 92 | |___/|_| 93 | 94 | Host/IP: xxxxx-dummytag-docker.nodes.hypernode.io (172.17.0.3) 95 | Account_id: 666 96 | Release: release-5278-28-ga9d3844 @ 2018-06-05 12:56:34 UTC 97 | 98 | Handy commands (more at http://support.hypernode.com): 99 | 100 | livefpm (see live PHP status) 101 | tal | pnl (follow live requests) 102 | 103 | hypernode-importer (import a Magento shop) 104 | hypernode-image-optimizer (reduce image size) 105 | hypernode-ftp (manage FTP accounts) 106 | 107 | magerun list (many useful extensions) 108 | 109 | ------------------------------------------------------------------------------ 110 | The SSH daemon will be up in a couple of seconds, you can login with: ssh -A app@172.17.0.3 111 | *** Running /etc/my_init.d/50_copy_key.sh... 112 | *** Running /etc/my_init.d/50_fix_mailname.sh... 113 | *** Running /etc/my_init.d/51_postfix.sh... 114 | * Starting Postfix Mail Transport Agent postfix 115 | ...done. 116 | *** Running /etc/my_init.d/60_restart_services.sh... 117 | Killing old Hypernode services 118 | Killing any old NGINX service 119 | Killing any old Redis service 120 | Killing any old PHP-FPM service 121 | Killing any old MySQL service 122 | Killing any old Mailhog service 123 | Killing any old Varnish service 124 | Giving any old services 5 seconds to stop.. 125 | No Sockets found in /var/run/screen/S-root. 126 | 127 | Starting new detached hypernode services. See screen -x 128 | Starting NGINX 129 | Starting Redis 130 | Starting PHP 131 | Starting MySQL 132 | Starting Mailhog 133 | Starting Varnish 134 | Giving the new services a couple of seconds to start.. 135 | hypernode-docker status: everything ok 136 | *** Running /etc/rc.local... 137 | *** Booting runit daemon... 138 | *** Runit started as PID 312 139 | ``` 140 | -------------------------------------------------------------------------------- /Documentation/switching-php-versions.md: -------------------------------------------------------------------------------- 1 | # Switching PHP versions 2 | 3 | Unlike the [hypernode-vagrant](https://github.com/ByteInternet/hypernode-vagrant) you can not just run `hypernode-switch-php` to change the PHP version. Because there is no systemctl to manage the services other steps must be performed. To switch to a different PHP version run the following commands: 4 | 5 | ```bash 6 | # Change the version in magweb.json 7 | jq ".php.version = 7.3" /etc/hypernode/magweb.json > /tmp/magweb.json 8 | mv /tmp/magweb.json /etc/hypernode/magweb.json 9 | 10 | # Restart all services 11 | bash /etc/my_init.d/60_restart_services.sh 12 | ``` 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hypernode-docker 2 | 3 | The official [Hypernode](http://hypernode.com/) Docker image for Magento development. This image can be used to set up a fast and easy local development environment for Hypernode, or as a build machine in a CI environment representative of the production environment. The image contains the exact same packages and configuration as a real Hypernode except for some Docker specific tweaks. By testing and developing against this image you can be sure that when you deploy to a Hypernode in production there will be no surprises because of different software versions or configurations. 4 | 5 | We build this image multiple times a day (every time we do a [release](https://support.hypernode.com/category/changelog/)) by applying our configuration management on the [phusion/baseimage-docker](https://github.com/phusion/baseimage-docker) ['fat' container](https://blog.phusion.nl/2015/01/20/baseimage-docker-fat-containers-treating-containers-vms/). By treating the Docker as a lightweight VM instead of as a vehicle for a single process we stay close to what an actual Hypernode actually looks like. No micro-services or a multi-container application, but a single instance with minimal network overhead and all batteries included. 6 | 7 | The `hypernode-docker` image has SSH, PHP, NGINX, MySQL, Redis and Varnish. The biggest difference between a real Hypernode and this container is that this environment does not have an [init system](https://en.wikipedia.org/wiki/Init). While it is possible to [run systemd within a Docker Container](https://developers.redhat.com/blog/2014/05/05/running-systemd-within-docker-container/) if the host is also runs [systemd](https://www.freedesktop.org/wiki/Software/systemd/), we choose not to do so to achieve greater compatibility and user-friendliness. 8 | 9 | ## Usage 10 | 11 | **Note about performance** 12 | 13 | We have tested usage of the Hypernode Docker image on Apple silicon ourselves and have found while it works out of the box, performance is unfortunately suboptimal (our current measures show 35 seconds of load time for a stock Magento homepage). If this performance drawback is fine for you, go ahead with it. If you need more performance when using the Hypernode Docker image, we recommend running the Docker image on a system that can run the image natively, like a workstation/laptop with an Intel or AMD processor. You could even run these images on a server with an AMD/Intel processor. And manage the test environments remotely through SSH, SFTP along with tools like VSCode. 14 | 15 | ### The Debian Buster hypernode-docker 16 | 17 | Starting the container 18 | ``` 19 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker:latest 20 | docker run docker.hypernode.com/byteinternet/hypernode-buster-docker:latest 21 | ``` 22 | 23 | Now with the introduction of Debian Buster we have also made it so that for some of the possible configurations we have provided a pre-built image so it is not necessary anymore to [manually install a different MySQL](https://github.com/ByteInternet/hypernode-docker/issues/33) for example than what would be in the default box. 24 | 25 | These are the URLs of the containers with specific configurations: 26 | ``` 27 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php56-mysql56:latest 28 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php70-mysql56:latest 29 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php71-mysql56:latest 30 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php72-mysql56:latest 31 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php73-mysql56:latest 32 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php74-mysql56:latest 33 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php80-mysql56:latest 34 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php81-mysql56:latest 35 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php56-mysql57:latest 36 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php70-mysql57:latest 37 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php71-mysql57:latest 38 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php72-mysql57:latest 39 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php73-mysql57:latest 40 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php74-mysql57:latest 41 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php80-mysql57:latest 42 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php81-mysql57:latest 43 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php82-mysql57:latest 44 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php56-mysql80:latest 45 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php70-mysql80:latest 46 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php71-mysql80:latest 47 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php72-mysql80:latest 48 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php73-mysql80:latest 49 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php74-mysql80:latest 50 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php80-mysql80:latest 51 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php81-mysql80:latest 52 | docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php82-mysql80:latest 53 | ``` 54 | 55 | ### Logging into the container 56 | 57 | Get the IP address 58 | ```bash 59 | # Find the container ID 60 | docker ps 61 | # Find the IP address of the container 62 | docker inspect -f '{{ .NetworkSettings.IPAddress }}' 63 | ``` 64 | 65 | Log in to the container: 66 | ```bash 67 | # SSH into the machine using the retrieved IP address. Example: 68 | ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null app@172.17.0.2 69 | # Or as the root user 70 | ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null root@172.17.0.2 71 | ``` 72 | 73 | The password is `insecure_docker_ssh_password`, or use the [pregenerated key](keys/README.md). 74 | 75 | ### Restarting services 76 | 77 | Because `systemctl` is not available inside the container, the services are started by an [init script](https://github.com/phusion/baseimage-docker#running-scripts-during-container-startup) on container startup. Note that because the systemd unit files are not parsed there could be a slight drift between what commandline flags the processes actually use in production compared to in this contanier. 78 | 79 | To restart all services run: 80 | 81 | ```bash 82 | bash /etc/my_init.d/60_restart_services.sh 83 | ``` 84 | 85 | If you only want to restart a specific service, inspect the `restart_services.sh` script and kill the screen for the service you want to restart. Then run the corresponding screen command to start the service again. 86 | 87 | ## See our excellent Documentation! 88 | 89 | [Starting the container](Documentation/starting-the-container.md) 90 | 91 | [Importing an existing Magento shop into the Docker](Documentation/importing-a-shop.md) 92 | 93 | [Switching PHP versions](Documentation/switching-php-versions.md) 94 | 95 | [Debugging with Xdebug in PhpStorm](Documentation/debugging-with-xdebug-in-phpstorm.md) 96 | 97 | [Adding your own keys to the container](Documentation/adding-keys-to-container.md) 98 | 99 | [Inspecting emails sent from the Docker](Documentation/inspecting-emails.md) 100 | 101 | [Installing Magento 1](Documentation/magento-1-install.md) 102 | 103 | [Mac specific example](examples/osx_development/README.md) 104 | 105 | ## Inspiration 106 | 107 | If you're wondering about how you can make best use of this image, check out some of these awesome project(s) by other users. 108 | 109 | ### [Disposable Magento testing environments with Kubernetes](https://elgentos.nl/blog/disposable-magento-testing-environments-with-k8s/) 110 | 111 | [Peter Jaap Blaakmeer](https://github.com/peterjaap) explains how [Elgentos](https://elgentos.nl) automatically sets up disposable testing environments for branches, tags and commits in their repositories by deploying the `hypernode-docker` image on a Kubernetes cluster on the Google Cloud Platform. 112 | 113 | ### [Local development with the Hypernode Docker container](https://blog.guapa.nl/local-development-with-the-hypernode-docker-container-linux?) 114 | 115 | [Ruthger Idema](https://github.com/ruthgeridema) describes how [Guapa](https://www.guapa.nl/) mimics their production environments as close as possible when developing on their local machines. Also includes a nice example for setting up Xdebug to work with PHPstorm in the `hypernode-docker`. 116 | 117 | ### [WSL development environment for Hypernode Docker](https://github.com/frosit/hypernode-docker-wsl2) 118 | 119 | [Fabio Ros](https://github.com/frosit) over at [FROSIT](https://frosit.nl/) created a fully-featured [WSL](https://docs.microsoft.com/en-us/windows/wsl/) development environment that integrates nicely with WSL on your Windows PC and your PHPStorm/VSCode editor. 120 | Check out the sourcecode and how to set this up over at the open-source [`hypernode-docker-wsl2`](https://github.com/frosit/hypernode-docker-wsl2) repository. 121 | 122 | ## Related projects 123 | 124 | ### [hypernode-vagrant](https://github.com/ByteInternet/hypernode-vagrant) 125 | 126 | A similar local development or build environment based on [Vagrant](https://github.com/ByteInternet/hypernode-vagrant), using [Virtualbox](https://www.virtualbox.org/) VMs or [LXC](https://linuxcontainers.org/) containers. The difference between hypernode-docker and hypernode-vagrant is that the Vagrant has a complete init system, making it more like a real Hypernode, while the Docker could be more user-friendly depending on your environment and preferences. 127 | 128 | ### [hypernode-deployment-hackathon](https://github.com/Hypernode/hypernode-deployment-hackathon) 129 | 130 | A work in progress Magento 2 module built by the community that can be used as a building block in combination with the Docker container in this repository to simplify the testing, building and deployment steps in your CI pipeline. 131 | 132 | -------------------------------------------------------------------------------- /examples/linux_development/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.hypernode.com/byteinternet/hypernode-buster-docker-php81-mysql80:latest 2 | MAINTAINER heesbeen 3 | 4 | # Install + Setup Xdebug 5 | RUN apt-get --allow-releaseinfo-change update && apt-get install -y php8.1-xdebug 6 | #RUN echo 'zend_extension=xdebug.so\n' >> /etc/php/8.1/mods-available/xdebug.ini 7 | RUN echo 'xdebug.mode=debug\n' >> /etc/php/8.1/mods-available/xdebug.ini 8 | RUN echo 'xdebug.client_port="9005"' >> /etc/php/8.1/mods-available/xdebug.ini 9 | RUN echo 'xdebug.client_host="127.0.0.1"' >> /etc/php/8.1/mods-available/xdebug.ini 10 | RUN echo 'xdebug.max_nesting_level=-1' >> /etc/php/8.1/mods-available/xdebug.ini 11 | RUN echo 'xdebug.idekey=PHPSTORM' >> /etc/php/8.1/mods-available/xdebug.ini 12 | 13 | # Expose Elastic 14 | RUN echo 'network.host: 0.0.0.0\n' >> /etc/elasticsearch/elasticsearch.yml 15 | RUN echo 'discovery.type: single-node\n' >> /etc/elasticsearch/elasticsearch.yml 16 | 17 | # Disable ratelimit 18 | RUN echo "geo \$conn_limit_map { default ''; }" > /data/web/nginx/http.conn_ratelimit;/usr/bin/nginx_config_reloader 19 | 20 | # Disable IonCube Loader 21 | RUN rm /etc/php/*/fpm/conf.d/01-ioncube.ini 22 | RUN rm /etc/php/*/cli/conf.d/01-ioncube.ini 23 | 24 | # Magento 2 Support 25 | RUN touch /data/web/nginx/magento2.flag 26 | RUN mkdir /data/web/magento2 27 | RUN rm -rf /data/web/public 28 | RUN ln -s /data/web/magento2/pub /data/web/public 29 | RUN chown -R app:app /data/web 30 | 31 | # Magerun2 Latest Version 32 | RUN wget https://files.magerun.net/n98-magerun2.phar 33 | RUN chmod +x ./n98-magerun2.phar 34 | RUN cp ./n98-magerun2.phar /usr/local/bin/n98-magerun2-latest.phar 35 | RUN ln -sf /usr/local/bin/n98-magerun2-latest.phar /usr/local/bin/magerun2 36 | 37 | # Install Composer Global packages 38 | RUN composer global require mage2tv/magento-cache-clean 39 | 40 | # Configuring Nginx 41 | RUN wget https://raw.githubusercontent.com/heesbeen/hypernode-docker-develop/master/Assets/https.dummytag.hypernode.io.conf 42 | #RUN wget https://raw.githubusercontent.com/ByteInternet/hypernode-docker/master/examples/linux_development/https.dummytag.hypernode.io.conf 43 | RUN mv https.dummytag.hypernode.io.conf /etc/nginx/sites/https.dummytag.hypernode.io.conf 44 | 45 | # Install Bash Profile additions 46 | RUN echo "alias cf2='~/.config/composer/vendor/bin/cache-clean.js -d /data/web/magento2 -w'" >> /data/web/.bash_aliases 47 | RUN echo "alias phpx='XDEBUG_CONFIG=\"idekey=PHPSTORM\" php -dxdebug.remote_enable=on -f'" >> /data/web/.bash_aliases 48 | -------------------------------------------------------------------------------- /examples/linux_development/README.md: -------------------------------------------------------------------------------- 1 | # Hypernode Docker Develop 2 | 3 | ## Quick start 4 | 5 | ### Pull and run container 6 | 7 | ``` 8 | cd examples/linux_development 9 | docker build -t hypernode-docker-develop . 10 | docker run -d -p 3306:3306 -p 22:22 -p 80:80 -p 443:443 -p 8025:8025 -p 9200:9200 -v :/data/web/magento --name hypernode-docker-develop 11 | ``` 12 | 13 | ### Copy ssh key to container 14 | 15 | ``` 16 | docker cp ~/.ssh/id_rsa.pub hypernode-docker-develop:/data/web/.ssh/id_rsa_client.pub 17 | docker exec hypernode-docker-develop bash -c 'cat /data/web/.ssh/id_rsa_client.pub > /data/web/.ssh/authorized_keys' 18 | docker exec hypernode-docker-develop bash -c 'cat /data/web/.ssh/id_rsa_client.pub > /root/.ssh/authorized_keys' 19 | ``` 20 | 21 | ### Disable password login 22 | 23 | ``` 24 | docker exec hypernode-docker-develop bash -c "'s/PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config" 25 | ``` 26 | 27 | ### Ssh into container 28 | 29 | ``` 30 | ssh app@127.0.0.1 -p22 31 | ``` 32 | 33 | ### Xdebug ssh tunnel 34 | 35 | ``` 36 | ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null app@localhost' -p22 -R 127.0.0.1:9005:127.0.0.1:9000 37 | ``` 38 | 39 | ### Bash aliases 40 | 41 | MageTV cache cleaner 42 | ``` 43 | cf --watch 44 | ``` 45 | 46 | Php cli with Xdebug 47 | ``` 48 | phpx bin/magento 49 | ``` 50 | -------------------------------------------------------------------------------- /examples/linux_development/https.dummytag.hypernode.io.conf: -------------------------------------------------------------------------------- 1 | include /etc/nginx/app/dummytag.hypernode.io/http.*; 2 | 3 | # SSL 4 | server { 5 | server_name dummytag.hypernode.io; 6 | listen 443 ssl http2 default_server; 7 | set $_HN_ENVIRONMENT "production"; 8 | 9 | include /etc/nginx/ssl_rules_intermediate.conf; 10 | ssl_certificate "/etc/nginx/ssl/*.hypernode.local.crtkeyca"; 11 | ssl_certificate_key "/etc/nginx/ssl/*.hypernode.local.crtkeyca"; 12 | 13 | include /etc/nginx/server.generic_includes.conf; 14 | include /etc/nginx/app/server.*; 15 | include /etc/nginx/app/dummytag.hypernode.io/server.*; 16 | include /etc/nginx/app/dummytag.hypernode.io/public.*; 17 | } 18 | 19 | # SSL staging 20 | server { 21 | server_name dummytag.hypernode.io; 22 | listen 8443 ssl http2 default_server; 23 | set $_HN_ENVIRONMENT "staging"; 24 | 25 | include /etc/nginx/ssl_rules_intermediate.conf; 26 | ssl_certificate "/etc/nginx/ssl/*.hypernode.local.crtkeyca"; 27 | ssl_certificate_key "/etc/nginx/ssl/*.hypernode.local.crtkeyca"; 28 | 29 | include /etc/nginx/server.generic_includes.conf; 30 | include /etc/nginx/app/server.*; 31 | include /etc/nginx/app/dummytag.hypernode.io/server.*; 32 | include /etc/nginx/app/dummytag.hypernode.io/staging.*; 33 | } 34 | -------------------------------------------------------------------------------- /examples/osx_development/.gitignore: -------------------------------------------------------------------------------- 1 | /.docker-sync 2 | -------------------------------------------------------------------------------- /examples/osx_development/README.md: -------------------------------------------------------------------------------- 1 | Use Hypernode-docker as a development environment on OSX 2 | ======================================================== 3 | 4 | Docker for Mac has some networking and filesystem limitations as opposed to running Docker on a Linux environment. 5 | This example shows how you could overcome those limitations and use `hypernode-docker` as a practical development environment on Mac OSX. 6 | After setting this up, your application will be available in a dockerized hypernode environment while still being able to use your IDE's development capability's like code intelligence. 7 | 8 | This __minimal example__ follows the same practices used within [hypernode-docker-osx](https://github.com/frosit/hypernode-docker-osx) development setup but without all the additional scripting and configurations. 9 | 10 | 11 | # 1. Requirements & Installation 12 | 13 | We used [Docker for mac](https://docs.docker.com/docker-for-mac/) for this setup. You should have that ready before proceeding. 14 | 15 | In addition to the `hypernode-docker` container we used the following to overcome the limitations: 16 | 17 | * [Docker-sync](http://docker-sync.io/) (Improves disk performance when mounted / synced) 18 | * [docker-compose](https://docs.docker.com/compose/compose-file/compose-file-v2/) (for additional configurations, should be part of Docker for mac) 19 | 20 | __Installing docker-sync__ 21 | 22 | ```bash 23 | # If you have 'gem' available 24 | gem install docker-sync 25 | 26 | # Else, if you have 'brew' available 27 | # https://github.com/EugenMayer/docker-sync/wiki/docker-sync-on-OSX 28 | brew install unison 29 | brew install eugenmayer/dockersync/unox 30 | ``` 31 | 32 | Besides unison, there are more sync strategies available. 33 | 34 | # 2. Configure your environment 35 | 36 | We need the following files to set things up: 37 | 38 | * docker-compose.yml 39 | * docker-sync.yml 40 | 41 | Copy those files to your project for editing (preferably one directory above your source code) 42 | 43 | 44 | ## 2.1 Minimal Configuration 45 | 46 | The minimal setup requires you to specify the path to your source code and optionally change ports if they are not available. 47 | 48 | __Specify the path to your projects' source code__ 49 | 50 | To have our project synced between the folder in our IDE and `hypernode-docker`, we have to define the path to the folder we want to sync in 'src', and where we want to sync it to in our hypernode (magento2/public) 51 | 52 | ```yaml 53 | # docker-sync.yml 54 | syncs: 55 | myproject-app-sync: 56 | src: './magento' # <<<----- Path to local directory 57 | 58 | # docker-compose.yml 59 | volumes: 60 | - app-sync:/data/web/public:nocopy # <<<----- Path to directory in hypernode-docker (currently: /data/web/public) 61 | ``` 62 | 63 | Magento 2 example 64 | 65 | ```yaml 66 | # docker-sync.yml 67 | syncs: 68 | myproject-app-sync: 69 | src: './magento' # Local directory 70 | 71 | # docker-compose.yml 72 | volumes: 73 | - app-sync:/data/web/magento2:nocopy # <<<---- /data/web/magento2 - create symlinks to public later 74 | ``` 75 | 76 | You could also specify an empty directory in 'src' and have the `hypernode-importer` import the store afterwards. 77 | 78 | __Handle port conflicts (Optional: if port 80/3306 is not available on your mac)__ 79 | 80 | The hypernode container runs on localhost, if you have a local web server like MAMP on port 80, docker won't start because of a port conflict. Change the conflicting ports to something available in `docker-compose.yml. 81 | 82 | ```yaml 83 | # docker-compose.yml 84 | ports: 85 | - '2222:22' # Connect with: ssh app@127.0.0.1 -p 2222 86 | - '8080:80' # Maps port 80 to 8080 -> http://localhost:8080 87 | - '3307:3306' 88 | ``` 89 | 90 | You could also just remove the 3306 port mapping and use SSH tunneling with [Sequel Pro](https://www.sequelpro.com/) instead if you like a MySQL GUI. 91 | 92 | 93 | ## 2.2 Advanced configuration (optional) 94 | 95 | You can go to great lengths with a setup like this, In addition to the minimal configurations, you could configure things even further. 96 | 97 | __Multiple projects__ 98 | 99 | Be aware of port/name conflicts when setting up multiple projects, Use the project name as a prefix. (example: coolstore.shop) 100 | 101 | ```yaml 102 | # docker-sync.yml 103 | syncs: 104 | coolstore-app-sync: # Prefixed with project name, matches volume name (must be unique) 105 | src: './magento' 106 | 107 | 108 | # docker-compose.yml 109 | services: 110 | hypernode-docker: 111 | container_name: coolstore-docker # Use the same project prefix to keep things organised 112 | ... 113 | volumes: 114 | - app-sync:/data/web/public:nocopy 115 | ... 116 | volumes: 117 | app-sync: 118 | external: 119 | name: 'coolstore-app-sync' # Matches name in docker-sync.yml 120 | ``` 121 | 122 | __Add development domains to your hosts file__ 123 | 124 | If you want your hypernode-docker instance to respond to something more descriptive than localhost, You should edit your `/etc/hosts` file with for example: `127.0.0.1 myproject-mydomain.tld` 125 | 126 | ```bash 127 | sudo nano /etc/hosts 128 | ``` 129 | ``` 130 | # /etc/hosts 131 | 255.255.255.255 broadcasthost 132 | ::1 localhost 133 | 127.0.0.1 myproject-hyperdocker.io # <=== our development domain 134 | ``` 135 | 136 | __Configure your volume sync__ 137 | 138 | `docker-sync` doesn't have to keep track of all changes that happen in your Magento installation, only the things that matter. With all the caching, compiling and logging Magento does these days docker-sync might be rather busy 139 | and it could be wise to define what should be watched and synced, and what not. 140 | 141 | If it's ignored by git, you could exclude it. There are things you maybe don't wan't to exclude like your media/wysiwyg folder if your working with images. Below is an example of how a sync could be configured. 142 | 143 | ```yaml 144 | # docker-sync.yml 145 | syncs: 146 | magento2-app-sync: 147 | src: './magento' 148 | sync_excludes: ['vendor', 'var','pub/media/catalog/product/cache','pub/static','pub/media/tmp','dev','generated'] 149 | watch_excludes: ['vendor', 'var','pub/media/catalog/product/cache','pub/static','pub/media/tmp','dev','generated','lib','setup','update','.*/.git', '.*/node_modules'] # Only changes in app and media 150 | sync_userid: '1000' 151 | notify_terminal: true 152 | monit_enable: true 153 | monit_interval: 10 154 | monit_high_cpu_cycles: 6 155 | ``` 156 | 157 | For more configuration options, see [Docker-sync configurations](https://github.com/EugenMayer/docker-sync/wiki/2.-Configuration) 158 | 159 | 160 | # 3. Start your environment 161 | 162 | When all is configured, It's time to boot our environment. 163 | 164 | __1. docker-sync start__ 165 | 166 | We have start `docker-sync` first for our volumes to become available. Head to the directory that contains `docker-sync.yml` and run: 167 | 168 | ```bash 169 | # Starting docker-sync 170 | # Make sure the directory in 'src' exists or it wil error! 171 | docker-sync start 172 | ``` 173 | 174 | If the folder you specified in `src` is empty, it only takes a few seconds. If it's a full Magento installation, the initial sync could take up to a few minutes based on the size. __Wait for it to finish__, otherwise docker can't find the volume and won't start. 175 | You know it's ready when you see something similar to below. 176 | 177 | ```yaml 178 | # ok starting initial sync of myproject-app-sync 179 | # success Sync container started 180 | # success Starting Docker-Sync in the background 181 | ``` 182 | 183 | __2. docker-compose up__ 184 | 185 | Open a new terminal / screen session, head to your directory containing the `docker-compose.yml` and run: 186 | 187 | ```bash 188 | docker-compose up 189 | ``` 190 | 191 | When it's done you will see: 192 | 193 | ``` 194 | myproject-hypernode-docker | *** Booting runit daemon... 195 | myproject-hypernode-docker | *** Runit started as PID 272 196 | ``` 197 | 198 | Your environment should now be available on the ports you specified. 199 | 200 | __3. Login with SSH__ 201 | 202 | To login over SSH, use the configured port together with the `-p` parameter, for example: 203 | 204 | ```bash 205 | # Default password for app/root: insecure_docker_ssh_password 206 | ssh -A app@127.0.0.1 -p 2222 207 | ``` 208 | 209 | __(important) Before you shutdown__ 210 | 211 | Shutting down means losing everything that is not in a synced place. For example imported databases, modified nginx files, additional dotfiles etc. 212 | Ensure to export your database before shutting down, this allows you to easily import it when you boot it back up. To deal with the loss of these kind of things, you could add extra volume mounts. 213 | 214 | The example below adds 2 more mounts, bin (provisioning/ configuration scripts), shared (storing backups, dumps and others). the volumes in the example below don't use docker-sync as they won't be heavily used. 215 | 216 | ```yaml 217 | # docker-compose.yml 218 | ... 219 | volumes: 220 | - './shared:/data/web/shared' # For database dumps, backups, config files, etc 221 | - './bin:/data/web/bin' # For scripts to help you configure, prepare for shutdown, etc. 222 | - app-sync:/data/web/public:nocopy # docker-sync mount 223 | ``` 224 | -------------------------------------------------------------------------------- /examples/osx_development/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | hypernode-docker: 5 | container_name: myproject-hypernode-docker 6 | image: docker.hypernode.com/byteinternet/hypernode-docker:latest 7 | ports: 8 | - '2222:22' # Connect with: ssh app@127.0.0.1 -p 2222 9 | - '8888:80' # If you have a webserver running, change to '8888:80' or any other free port on localhost 10 | - '3307:3306' 11 | volumes: 12 | - app-sync:/data/web/public:nocopy # For Magento2 change to: 'app-sync:/data/web/magento2:nocopy' and follow https://support.hypernode.com/knowledgebase/installing-magento-2-on-hypernode/ 13 | 14 | volumes: 15 | app-sync: 16 | external: 17 | name: 'myproject-app-sync' # keep this unique! 18 | -------------------------------------------------------------------------------- /examples/osx_development/docker-sync.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | options: 4 | verbose: true 5 | syncs: 6 | myproject-app-sync: # Unique! Matches volume name in docker-compose.yml 7 | src: './magento' # Path to Magento source code for example in IDE (can be anywhere) 8 | sync_userid: '1000' # Don't remove! 9 | sync_excludes: ['var/cache','var/session','var/log','var/view_preprocessed'] # Extend for M1 / M2 10 | watch_excludes: ['var/cache','var/session','var/log','var/view_preprocessed'] # Extend for M1 / M2 11 | -------------------------------------------------------------------------------- /examples/osx_development/magento/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hypernode Docs 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /keys/README.md: -------------------------------------------------------------------------------- 1 | # Keys 2 | 3 | This directory contains a pregenerated insecure public/private keypair that can be used to log in to the `hypernode-docker` container. Do NOT use this key for production purposes. The Docker image is configured to accept this key, but there is also a default password for the `app` and the `root` user. 4 | 5 | ## Logging in with the insecure key 6 | 7 | ``` 8 | ssh -i keys/insecure_key app@172.17.0.2 9 | ``` 10 | 11 | ## Logging in with the default password 12 | 13 | ``` 14 | ssh app@172.17.0.2 -o PreferredAuthentications=password -o PubkeyAuthentication=no 15 | app@172.17.0.2's password: 16 | # The default password is 'insecure_docker_ssh_password' 17 | ``` 18 | -------------------------------------------------------------------------------- /keys/insecure_key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | 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 51 | -----END RSA PRIVATE KEY----- 52 | -------------------------------------------------------------------------------- /keys/insecure_key.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC5vXxAPutixzcUhBhLpBBBtmj5zEFldBS2pxDneShYAOwW/v3ef5nLURgoZpe3qNzixMNGBuFrinIiUDrKjsDjloudRoHORNWBPRE5yx7P8wgzMtKRYu0QwrkkNWgvvcOImfO7ZIme65LzprgFD5st7untAmNJ9Glx0BQz8GBfeI15mFQw36DycHJriFmGHeDYY6M4ZnF76bv5zCpqxIeVicVAD6EBxtp3ibAzEp1oN4QzuE2P7mGjjx3Tq3E6gc6d51045R3q5zIOc6MORvQHEzgPQSeR0A2OwtD058M7PQHdHl1QO8Ln+FB/jgleikBSajFmtYRiXiXYtq5EhbwpRDmRC4+14SXQwiHPSExa+Kie180MyJLE4g+CS7hld5lG8G/BLcnhvQhAg+37l/lCeb2bnrXDy6mtCaVu4K2I4akifliI4FKa6zxjPRP6wm7Ltq28yVZI8uTjkF6MFKuEbuDgsp0DpPvaX3x4Wje2LWnnKvSLzXCEk6YzajSEAZkkSeARjhL/MG12D4R6Qth8NYb0tqFbExvpB7X6SuRF5eLmkl/JCm3HXJAGZCKjkG5RcCSMC9MgnAQYm4jdwbi1AuyYdzOd1nXKLl0Oz3ihfXv1l4oQ1ljPoSBDupV7PNJkuujTkKfiiXsf2vn4c7x7qkabYqCe0GpcnlI1Z8evZQ== insecure_key 2 | --------------------------------------------------------------------------------