diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 2259051..6022f83 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -3,10 +3,10 @@ name: spt-magento services: mariadb: - image: mariadb:10.4 - container_name: mariadb-10.4 + image: mariadb + container_name: mariadb ports: - - "3401:3306" + - "3306:3306" environment: # think about .env file here MYSQL_ROOT_PASSWORD: root @@ -19,8 +19,8 @@ services: build: context: . dockerfile: Dockerfile - image: 'php81_apache' - container_name: php-8.1-apache + image: 'php_apache' + container_name: php-apache environment: - "APACHE_LOG_DIR:/src" ports: @@ -33,18 +33,12 @@ services: - default depends_on: - mariadb - - elasticsearch - elasticsearch: - image: docker.io/bitnami/elasticsearch:7 - container_name: elasticsearch7 - volumes: - - ./../.elasticsearch:/bitnami/elasticsearch/data' phpmyadmin: image: phpmyadmin container_name: phpmyadmin restart: always ports: - - "8102:80" + - "81:80" environment: - PMA_ARBITRARY=1 networks: diff --git a/.gitignore b/.gitignore index 8bf177f..801ac0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ .idea -.mariadb -.elasticsearch \ No newline at end of file +.mariadb \ No newline at end of file diff --git a/README.md b/README.md index 41c780e..b97f76a 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ - `docker-compose down` # Remove image -- `docker image rm php81_apache` +- `docker image rm php_apache` # Stop containers, remove image and recreation of container -- `docker-compose down && docker image rm php81_apache && docker-compose up -d` +- `docker-compose down && docker image rm php_apache && docker-compose up -d` # Get into container -- `docker exec -it php-8.1-apache /bin/bash` +- `docker exec -it php-apache /bin/bash` - `docker build -t magento-php .` @@ -44,35 +44,5 @@ 4. Restart the containers using the following command: `docker-compose up -d` -# INSTALL MAGENTO via composer -- docker Container starten und in den Container wechseln -- composer install -- "bin/magento install" Befehl: - php bin/magento setup:install --base-url="http://127.0.0.1" \ - --db-host="magento-mariadb" \ - --db-name="magento" \ - --db-user="root" \ - --db-password="root" \ - --admin-firstname="Admin" \ - --admin-lastname="Admin" \ - --admin-email="re@spawntree.de" \ - --admin-user="admin" \ - --admin-password="magento2test" \ - --use-rewrites="1" \ - --backend-frontname="admin" \ - --db-prefix=mage_ \ - --search-engine=elasticsearch7 \ - --elasticsearch-host=elasticsearch \ - --elasticsearch-port=9200 - -# create admin account -bin/magento admin:user:create --admin-user=admin --admin-password=admin2spt --admin-email=re@spawntree.de --admin-firstname=Admin --admin-lastname=Administrator - -# mkdir for volumes -mkdir -m 775 elasticsearch_data magento_data mariadb_data -mkdir .elasticsearch .mariadb - -# standard permission magento - do we use it? -find . -type d -exec chmod 0711 {} + -find . -type f -exec chmod 0644 {} + -find . -type f -name “*.php” -exec chmod 600 {} + \ No newline at end of file +# Enable ssl document +https://time2hack.com/dockerize-php-app-with-apache-on-https/ \ No newline at end of file