PrestaShop / PrestaShop/docker

PrestaShop in Docker redirects to localhost:8080 instead of configured domain

Open
#395 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
281
Forks
190
PR merge metrics
No merged PRs in 30d

Description

Description

I'm experiencing an issue where my PrestaShop setup redirects the domain to localhost:8080 when i use browser instead of the actual domain set for my shop.

Steps to Reproduce

Use ubuntu 22.04

  1. Set up PrestaShop in a Docker container.
  2. Use Caddy as the web server.
  3. Access https://shop.mydomain.com.
Expected Behavior

The shop should open correctly without redirecting to localhost:8080.

Actual Behavior

The shop redirects to localhost:8080, causing a failed page load.

My Caddyfile

shop.mydomain.com {
  reverse_proxy localhost:8080
}

I use the docker compose file from the doc

version: '3'

services:
  mariadb:
    container_name: prestashop-db
    image: mariadb:10.5
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: admin
      MYSQL_DATABASE: prestashop
    volumes:
      - ./mariadb_data:/var/lib/mysql
      - ./my.cnf:/etc/mysql/my.cnf
    networks:
      - prestashop_network
    deploy:
      resources:
        limits:
          memory: 1G

  prestashop:
    container_name: prestashop
    image: prestashop/prestashop:latest
    restart: unless-stopped
    depends_on:
      - mariadb
    ports:
      - "8080:80"
    environment:
      DB_SERVER: prestashop-db
      DB_NAME: prestashop
      DB_USER: root
      DB_PASSWD: admin
      PS_INSTALL_AUTO: 1
      ## there i  also tried my own domain but doesnt' work too but. The doc seems to recommand localhost:8080
      PS_DOMAIN: localhost:8080
    volumes:
      - ./prestashop_data:/var/www/html
    networks:
      - prestashop_network

networks:
  prestashop_network:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Docker Compose example in the documentation and the PS_DOMAIN environment variable shown in the issue. Compare the documented localhost:8080 setting with the Caddy reverse_proxy configuration and reproduce the redirect using the supplied Ubuntu, Docker, and domain steps. Done means the documented setup opens the configured domain without redirecting to localhost:8080.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, mariadb
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.