Edit in GitHubLog an issue

Production mode

Production mode simulates your Commerce application in production so that you can verify configured services.

Production mode is the default configuration setting for launching the Docker environment with read-only filesystem permissions.

Prerequisites:

Complete the installation steps.

To launch the Docker environment in production mode:

  1. In your local environment, start the Docker configuration generator. You can use the service configuration options, such as --php, to specify a version.

    Copied to your clipboard
    ./vendor/bin/ece-docker build:compose
  2. Optional: If you have a custom PHP configuration file, copy the default configuration DIST file to your custom configuration file and make any necessary changes.

    Copied to your clipboard
    cp .docker/config.php.dist .docker/config.php
  3. Build files to containers and run in the background.

    Copied to your clipboard
    docker compose up -d
  4. Install Adobe Commerce in your Docker environment.

    • Build Adobe Commerce in the Docker container.

      Copied to your clipboard
      docker compose run --rm build cloud-build
    • Deploy Adobe Commerce in the Docker container.

      Copied to your clipboard
      docker compose run --rm deploy cloud-deploy
    • Run post-deploy hooks.

      Copied to your clipboard
      docker compose run --rm deploy cloud-post-deploy
  5. Configure and connect Varnish.

    Copied to your clipboard
    docker compose run --rm deploy magento-command config:set system/full_page_cache/caching_application 2 --lock-env
    Copied to your clipboard
    docker compose run --rm deploy magento-command setup:config:set --http-cache-hosts=varnish
  6. Clear the cache.

    Copied to your clipboard
    docker compose run --rm deploy magento-command cache:clean
  7. Optional: Restart services if the static content does not synchronize with all images after generation on build phase.

    Copied to your clipboard
    docker compose restart
  8. Access the local storefront by opening one of the following URLs in a browser:

    • http://magento2.docker

    • https://magento2.docker

  9. Use the default credentials to log in to the Admin (https://magento2.docker/admin).

    • username = Admin
    • password = 123123q
  10. Access the default email service: http://magento2.docker:8025

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.