Created
July 17, 2018 12:57
-
-
Save TerrorSquad/3f9e1ce4481254467e69468f5b1ffa23 to your computer and use it in GitHub Desktop.
Magento 2 - Docker configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
mysql: | |
image: mysql:5.7 | |
container_name: mysql | |
restart: always | |
volumes: | |
- ./mysql:/var/lib/mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=bS3vF3TQLXphcGxk | |
- MYSQL_DATABASE=magento | |
- MYSQL_USER=magento | |
- MYSQL_PASSWORD=magento | |
ports: | |
- 3306:3306 | |
networks: | |
- backend | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
container_name: phpmyadmin | |
links: | |
- "mysql:mysql" | |
ports: | |
- 8181:80 | |
environment: | |
PMA_ARBITRARY: 1 | |
MYSQL_ROOT_PASSWORD: bS3vF3TQLXphcGxk | |
MYSQL_USER: magento | |
MYSQL_PASSWORD: magento | |
networks: | |
- backend | |
frontend: | |
# build has been left out on purpose. The steps to build a container | |
# are not covered in the Dockerfile, they have been left out on purpose | |
# so all preparation is done in an intermediate environment that has | |
# all requirements. See .gitlab-ci.yml. | |
build: . | |
image: magento2:latest | |
container_name: magento-frontend | |
links: | |
- "mysql:mysql" | |
restart: always | |
environment: | |
- MYSQL_HOSTNAME=mysql | |
- MYSQL_USERNAME=magento | |
- MYSQL_PASSWORD=magento | |
- MYSQL_DATABASE=magento | |
- CRYPTO_KEY=SxKT2RyykbmbhDmh | |
- URI=http://localhost:8080 | |
- RUNTYPE=development | |
- ADMIN_USERNAME=admin | |
- ADMIN_PASSWORD=adm1nistr4tor | |
- ADMIN_FIRSTNAME=Your | |
- ADMIN_LASTNAME=Name | |
- [email protected] | |
- UNATTENDED=true | |
ports: | |
- 8080:80 | |
networks: | |
- backend | |
networks: | |
backend: | |
driver: bridge | |
volumes: | |
db: | |
driver: local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM sensson/magento2 | |
COPY src/cron /etc/cron.d/magento2 | |
COPY src/ /var/www/html/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment