0

I am trying to set up a local instance of Magento to play around with.

I am having difficulties using this image: bitnami/magento

I am able to get the homepage up but doing anything else ends with the site can't be reached.

I wasn't even able to get the homepage before. I'm getting stuck at the homepage.

I made a docker-compose file which I got a template from bitnami:

version: '2'
services:
  mariadb:
    image: 'bitnami/mariadb:10.2'
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
      - MARIADB_USER=bn_magento
      - MARIADB_PASSWORD=magento_db_password
      - MARIADB_DATABASE=bitnami_magento
    volumes:
      - 'mariadb_data:/bitnami'
  magento:
    image: 'bitnami/magento:2'
    environment:
      - MARIADB_HOST=mariadb
      - MARIADB_PORT_NUMBER=3306
      - MAGENTO_DATABASE_USER=bn_magento
      - MAGENTO_DATABASE_PASSWORD=magento_db_password
      - MAGENTO_DATABASE_NAME=bitnami_magento
      - ELASTICSEARCH_HOST=elasticsearch
      - ELASTICSEARCH_PORT_NUMBER=9200
      - MAGENTO_HOST=localhost
      - EXTERNAL_HTTP_PORT_NUMBER=8085
    ports:
      - '80:80'
      - '8085:80'
    volumes:
      - 'magento_data:/bitnami'
    depends_on:
      - mariadb
      - elasticsearch
  elasticsearch:
    image: 'bitnami/elasticsearch:6'
    volumes:
      - 'elasticsearch_data:/bitnami/elasticsearch/data'
volumes:
  elasticsearch_data:
    driver: local
  mariadb_data:
    driver: local
  magento_data:
    driver: local
1

Magento requires SSL on certian URLs.

Basically I had to follow the documentation here and edit it to my own localhost by adding:

MAGENTO_HOST=localhost
EXTERNAL_HTTP_PORT_NUMBER=8085
EXTERNAL_HTTPS_PORT_NUMBER=8086

Then I added port bindings:

ports:
  - '80:80'
  - '443:443'
  - '8085:80'
  - '8086:443'

So far everything works and Magento requires SSL on certain URLS

1
  • 1
    Thank you for posting an answer to your own question, it helped me!
    – Kai Mechel
    Sep 26 '20 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.