mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-25 02:04:06 +02:00
.. | ||
docker-compose.yml | ||
Dockerfile | ||
README.md |
prestashop
PrestaShop has comprehensive product features for small, medium or large ecommerce stores and sell online. Hundreds of features are standard and 100% free.
docker-compose.yml
prestashop:
image: vimagick/prestashop
ports:
- "8000:80"
links:
- mysql
volumes:
- /var/www
restart: always
mysql:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=prestashop
restart: always
Nginx Config
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name shop.easypi.pro;
ssl_certificate ssl/easypi.pro.crt;
ssl_certificate_key ssl/easypi.pro.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
client_max_body_size 20M;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Enable SSL
-
Activate SSL directtly on the database, (because the broken images avoid to use the activate SSL option on the admin panel, click on the url simply does not pass the test). To ativate SSL on the database i use the next query on:
UPDATE ps_configuration SET value = 1 WHERE name = 'PS_SSL_ENABLED';
-
Add the next line to the
.htacces
file to avoid teh loop redirect issue with SSL enabled:SetEnv HTTPS On
-
Configure > Shop Parameters > General > Enable SSL on all pages
Reset Admin Password
$ docker-compose exec prestashop bash
>>> grep cookie app/config/parameters.php
'cookie_key' => 'xxxxxx',
>>> exit
$ docker-compose exec mysql mysql -uroot -proot prestashop
>>> select * from ps_employee where email='admin@easypi.pro';
>>> update ps_employee set passwd=md5(concat("xxxxxx", "password")) where email='admin@easypi.pro';
>>> select * from ps_employee where email='admin@easypi.pro';