Moved to _dev
This commit is contained in:
66
prestashop/docker-compose.yaml
Normal file
66
prestashop/docker-compose.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
services:
|
||||
mysql:
|
||||
container_name: mysql
|
||||
image: mysql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: admin
|
||||
MYSQL_DATABASE: prestashop
|
||||
networks:
|
||||
- prestashop_network
|
||||
volumes:
|
||||
- dbdata:/var/lib/mysql
|
||||
|
||||
nginx:
|
||||
container_name: nginx
|
||||
image: nginx
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
volumes_from:
|
||||
- prestashop
|
||||
ports:
|
||||
- 127.0.0.1:8090:80
|
||||
networks:
|
||||
- prestashop_network
|
||||
depends_on:
|
||||
- prestashop
|
||||
|
||||
prestashop:
|
||||
container_name: prestashop
|
||||
image: prestashop/prestashop
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- mysql
|
||||
environment:
|
||||
DB_SERVER: mysql
|
||||
DB_NAME: prestashop
|
||||
DB_USER: root
|
||||
DB_PASSWD: root
|
||||
PS_DOMAIN: localhost:8090
|
||||
PS_FOLDER_ADMIN: admin9123
|
||||
PS_FOLDER_INSTALL: install9123
|
||||
networks:
|
||||
- prestashop_network
|
||||
volumes:
|
||||
- ./modules/my_module:/var/www/html/modules/my_module
|
||||
- ./classes:/var/www/html/classes
|
||||
- psdata:/var/www/html
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
restart: unless-stopped
|
||||
container_name: adminer
|
||||
ports:
|
||||
- "8091:8080" # Changed port mapping to reflect internal port
|
||||
environment:
|
||||
- ADMINER_DEFAULT_SERVER=mysql # Ensuring Adminer connects to the MySQL service
|
||||
networks:
|
||||
- prestashop_network
|
||||
|
||||
networks:
|
||||
prestashop_network:
|
||||
|
||||
volumes:
|
||||
psdata:
|
||||
dbdata:
|
||||
52
prestashop/nginx.conf
Normal file
52
prestashop/nginx.conf
Normal file
@@ -0,0 +1,52 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name shop.delmar.bzh;
|
||||
|
||||
root /var/www/html;
|
||||
|
||||
index index.php index.html index.htm;
|
||||
|
||||
set $admin_dir /admin9123;
|
||||
|
||||
location ~ /admin.*/(sell|api|common|_wdt|modules|improve|international|configure|addons|_profiler|product|combination|specific-price)/(.*)$ {
|
||||
try_files $uri $uri/ /index.php?q=$uri&$args $admin_dir/index.php$is_args$args;
|
||||
}
|
||||
|
||||
location / {
|
||||
# Redirect pretty urls to index.php
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
# Images
|
||||
rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$1$2$3.jpg last;
|
||||
rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last;
|
||||
rewrite ^/c/([0-9]+)(-[.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+.jpg$ /img/c/$1$2$3.jpg last;
|
||||
rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+.jpg$ /img/c/$1$2.jpg last;
|
||||
|
||||
# AlphaImageLoader for IE and fancybox
|
||||
rewrite ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 last;
|
||||
|
||||
# Web service API
|
||||
rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass prestashop:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_read_timeout 600;
|
||||
proxy_connect_timeout 600;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user