Skip to content

Instantly share code, notes, and snippets.

View varinen's full-sized avatar

Oleg Ishenko varinen

View GitHub Profile
version: "3"
services:
db_node_domain_2:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
version: "3"
services:
db_node_domain:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
version: "3"
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
letsencrypt-proxy:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- letsencrypt-certs:/etc/nginx/certs
- letsencrypt-vhost-d:/etc/nginx/vhost.d
- letsencrypt-html:/usr/share/nginx/html
environment:
- [email protected]
version: "3"
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
docker network create nginx-proxy
├── repository_root
│ ├── proxy
│ │ ├──docker-compose.yml
│ ├── site1
│ │ ├──docker-compose.yml
│ ├── site2
│ │ ├──docker-compose.yml
@varinen
varinen / gist:6785074
Created October 1, 2013 21:04
An SQL query generated by Magento's tax calculation resource model on a shop that uses the FireGento_GermanSetup extension. This query fetches tax rates that satisfy a tax request object with key 1|3|1|DE|79|12345 (store ID = 1, customer tax class ID = 3, product tax class id = 1, country code = DE, region id = 79 "Niedersachsen", and postcode =…
(SELECT
`main_table`.`tax_calculation_rate_id`,
`main_table`.`tax_calculation_rule_id`,
`main_table`.`customer_tax_class_id`,
`main_table`.`product_tax_class_id`,
`rule`.`priority`,
`rule`.`position`,
`rate`.`rate` AS `value`,
`rate`.`tax_country_id`,
`rate`.`tax_region_id`,
@varinen
varinen / file_custom_option_script.php
Last active May 25, 2018 07:22
Dynamically adding a file type custom option to multiple products (IDs 100, 101, and 102) in Magento.
<?php
require_once 'app/Mage.php';
Mage::app('default');
$productIds = array(100, 101, 102);
$option = array(
'title' => 'Test Option',
'type' => 'file',
'is_require' => 1,
@varinen
varinen / mysql4-install-0.1.0.php
Created December 17, 2012 22:04
One possible approach to adding attribute sets and groups in Magento
<?php
/**
* Installer script
*
* @category Solvingmagento
* @package Solvingmagento_Samples
* @author Oleg Ishenko <[email protected]>
* @copyright Copyright (c) 2012 - 2013 Oleg Ishenko
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @version GIT: <0.1.0>