https://github.com/redsign77/m2-docker-sandbox
Magento 2 docker sandbox
https://github.com/redsign77/m2-docker-sandbox
Last synced: 4 months ago
JSON representation
Magento 2 docker sandbox
- Host: GitHub
- URL: https://github.com/redsign77/m2-docker-sandbox
- Owner: RedSign77
- Created: 2021-02-14T11:53:32.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-07T08:26:40.000Z (almost 5 years ago)
- Last Synced: 2025-05-20T18:58:09.389Z (9 months ago)
- Language: Shell
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker environment for Sandbox M2 project (Linux only)
## First steps
### Install _Docker_ and _Docker Compose_
For more information visit the [official Docker documentation](https://docs.docker.com/get-docker/).
### Clone this repository
```
git clone https://github.com/RedSign77/m2-docker-sandbox sandboxm2
```
> Note: make sure you can clone repositories from GitLab over SSH
### Stop all services using port 80 and 443
e.g. Apache/Nginx server or another docker containers running on the host machine.
## Setup
### Option A) Build images, run containers and setup Magento using script (recommended)
Run the
```
make install
```
command from project root.
### Option B) Build images, run containers and setup Magento manually
Run the commands found in the `.docker/install.sh` bash script.
#### Make commands
**To run commands and scripts in the PHP container which contains Magento, use**
```
make enter
```
> Note: it is like login with SSH to a remote server
To flush the Redis storage:
```
make redis-flush (or make rf)
```
To shutdown the containers use:
```
make down
```
For more `make` options use:
```
make help
```
After this you can visit the following URLs:
Magento: [http://sandboxm2.localhost](http://artandsecret.localhost)\
phpMyAdmin: [http://phpmyadmin.localhost](http://phpmyadmin.localhost)\
MailHog: [http://mailhog.localhost](http://mailhog.localhost)\
Traefik: [http://traefik.localhost](http://traefik.localhost)
Magento admin username/password: admin/Admin1234\
Magento admin URL: sboxadmin
## Using HTTPS
If you want to visit the aforementioned URLs over HTTPS without security warnings, you must install the `RootCA.crt` certificate to your browser, found in the `.docker/traefik/certs` folder.
## Notes
To run PHP, Magento, Composer, etc. commands, make sure you run them in the php-fpm container (see `make enter`)!\
Git is not installed in any of the containers, so use the host machine's git command instead!
## List of used containers, volumes, networks
### Services
- applications; tianon/true (volume only container)
- php-fpm; php:7.4-fpm
- apache; apache:2.4.38-3+deb10u4
- redis; redis:6.0.8
- mariadb; mariadb:10.3.27
- traefik; traefik:1.7-alpine
- phpmyadmin; phpmyadmin/phpmyadmin
- mailhog; mailhog/mailhog
- elasticsearch; elasticsearch:7.9.3
### Volumes
- mysql (driver: local)
- redis (driver: local)
- elasticsearch (driver: local)
### Networks
- frontend (name: traefik; external)
- backend (driver: bridge)
## Maintainer(s):
- Bálint Bérczy
- Zoltán Németh
:fire: **Happy developing!**