Example #1
0
def start(action='rebuild'):
    if action == 'rebuild':
        command = 'up -d --build'
    else:
        command = action
    myrun(
        "cd %s &&  SRCDIR=. DATADIR=%s  HTTPPORT=%s HTTPPORTPMA=8888 docker-compose -p %s %s"
        % (env.deploy_dir, env.data_dir, env.http_port, env.project, command))
Example #2
0
def update_cron():
    #myrun("cd %s/cron && chmod +x sync*" % env.deploy_dir )
    process_template("cron-sample", "cron-tab", {
        'DEPLOY_DIR': env.deploy_dir,
        'HOME_DIR': env.home
    })
    put("cron-tab", "%s/cron/cron-tab" % env.deploy_dir)
    myrun("crontab %s/cron/cron-tab" % env.deploy_dir)
Example #3
0
def prepare_conf(password="******"):
    myrun(
        "ln -sf %s/wp-content/plugins/memcached-redux/object-cache.php %s/wp-content/object-cache.php"
        % (env.deploy_dir, env.deploy_dir))
    process_template("wp-config.prod.php", "wp-config.php", {
        'PASSWORD': password,
        'MEMCACHED_URI': env.memcached
    })
    put("wp-config.php", "%s/wp-config.php" % env.deploy_dir)
Example #4
0
def update_config():
    myrun("cd %s && " % (env.deploy_dir))
Example #5
0
def update():
    myrun("cd %s && git pull -r" % (env.deploy_dir))
Example #6
0
def clone():
    myrun("cd %s && git clone %s" % (env.home, env.repo))
Example #7
0
def flash_memcache():
    myrun("sudo systemctl restart memcached")
Example #8
0
def flash_http_cache():
    myrun("sudo rm -r -f /dev/shm/fastcgi_temp ")
    myrun("sudo rm -r -f /dev/shm/fastcgi_cache ")
    myrun("sudo systemctl reload nginx")
Example #9
0
def link_data():
    myrun("ln -fs %s/uploads %s/wp-content/uploads" %
          (env.data_dir, env.deploy_dir))
Example #10
0
def mysql():
    myrun("docker exec -ti %s_mysql_1 mysql -A -uroot -ppassword wordpress" %
          env.project)