This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Sortable from 'vue-sortable/vue-sortable.js' | |
Vue.use(Sortable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** WordPress のためのデータベース名 */ | |
/** テスト環境のHOST */ | |
if($_SERVER["HTTP_HOST"] == "testURL.jp") { | |
define('DB_NAME', 'test_DB_Name'); | |
/** MySQL データベースのユーザー名 */ | |
define('DB_USER', 'DB_Test_User_Name'); | |
/** MySQL データベースのパスワード */ | |
define('DB_PASSWORD', 'Test_DB_PASSWD'); | |
/** MySQL のホスト名 */ | |
define('DB_HOST', '127.0.0.1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace App\Controller; | |
use Cake\Controller\Controller; | |
use Cake\Event\Event; | |
class AppController extends Controller | |
{ | |
public function initialize() | |
{ | |
parent::initialize(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppController extends Controller | |
{ | |
var $components = array('Security'); | |
function beforeFilter() | |
{ | |
// When you want to specify the action | |
/* | |
*if ($this->action === 'index') { | |
* $this->Security->blackHoleCallback = 'forceSSL'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --name your-container-name -e MYSQL_ROOT_PASSWORD=your-mysql-root-password -d mysql:5.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dsn = 'mysql:host=172.17.0.2;dbname=your-database-name'; | |
$username = 'root'; | |
$password = 'your-root-password'; | |
$options = array( | |
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', | |
); | |
$dbh = new PDO($dsn, $username, $password, $options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker inspect --format '{{ .NetworkSettings.IPAddress }}' your-container-name-or-id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -it your-container-name bash | |
#例 MySQLのDockerコンテナにログインしてMySQLにアクセス | |
docker exec -it your-container-name bash | |
root@0your-container-name:/# mysql -u root -p | |
Enter password: | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 25 | |
Server version: 5.7.18 MySQL Community Server (GPL) | |
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -v /your-app-source-dir:/var/www/html --privileged -d -p 8000:80 --name your-php-container-name your-php-image /sbin/init -DFOREGROUND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos7 | |
MAINTAINER matsuda | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
RUN yum -y install wget epel-release | |
RUN wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm | |
RUN rpm -Uvh ./remi-release-7.rpm | |
RUN sed -i '4a priority=1' /etc/yum.repos.d/remi-php71.repo |