PrestaShop logo

PrestaShop

Open source e-commerce platform for building an online store

Alternative to: shopify, woocommerce, bigcommerce, magento


PrestaShop is an open source e-commerce web application for building and running an online store, covering both the customer-facing storefront and the merchant back office. It is highly customizable through modules and themes, supports all major payment services, ships with translations and localization for many countries, and has a fully responsive front and back office design.

PrestaShop Docker Compose example

Self-host PrestaShop on your own server, homelab, or VPS starting from this Docker Compose example. It runs PrestaShop in Docker containers using the official prestashop/prestashop:latest, mariadb:lts images, with persistent volumes and automatic restarts preconfigured. Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.

services:
  prestashop:
    image: prestashop/prestashop:latest
    restart: unless-stopped
    depends_on:
      mysql:
        condition: service_healthy
    ports:
      - "8080:80"
    environment:
      # Hostname of the database service on the compose network
      DB_SERVER: "mysql"
      # Database name PrestaShop connects to (created on first init below)
      DB_NAME: "prestashop"
      # Database user PrestaShop connects as
      DB_USER: "prestashop"
      # Database password (internal to the compose network)
      DB_PASSWD: "prestashop"
      # Run the PrestaShop installer automatically on first boot
      PS_INSTALL_AUTO: "1"
      # Do NOT drop/recreate the database on later boots — keeps your shop data
      PS_ERASE_DB: "0"
      # Disable developer mode (production)
      PS_DEV_MODE: "0"
      # Public domain the shop is reached at (host:port for this copy-paste example)
      PS_DOMAIN: "localhost:8080"
      # Leave TLS to your reverse proxy — PrestaShop speaks plain HTTP internally
      PS_ENABLE_SSL: "0"
      # Back-office (admin) login email
      ADMIN_MAIL: "admin@example.com"
      # Back-office (admin) login password — change this
      ADMIN_PASSWD: "changeme123"
      # Default shop language (ISO 639-1 code)
      PS_LANGUAGE: "en"
      # Default shop country (ISO 3166-1 alpha-2 code)
      PS_COUNTRY: "GB"
    volumes:
      - ps_data:/var/www/html

  mysql:
    image: mariadb:lts
    restart: unless-stopped
    environment:
      # Root password (internal to the compose network)
      MARIADB_ROOT_PASSWORD: "prestashop"
      # Application database + user created on first init
      MARIADB_DATABASE: "prestashop"
      MARIADB_USER: "prestashop"
      MARIADB_PASSWORD: "prestashop"
    volumes:
      - db_data:/var/lib/mysql
    healthcheck:
      test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
      interval: 10s
      timeout: 5s
      retries: 10
      start_period: 30s

volumes:
  ps_data:
  db_data:

Values set to changeme are required — replace them with your own values before starting PrestaShop.

Prefer a managed setup? WinterFlow installs, configures, and updates PrestaShop for you using this same Docker Compose configuration.