This file contains hidden or 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
| version: '3' | |
| services: | |
| db: | |
| image: mysql:5.7 | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| restart: always | |
| environment: | |
| MYSQL_ROOT_PASSWORD: ${MYSQL_DATABASE_PASSWORD} | |
| MYSQL_DATABASE: wpdb |
This file contains hidden or 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
| version: '3.2' | |
| services: | |
| agent: | |
| image: portainer/agent | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| - /var/lib/docker/volumes:/var/lib/docker/volumes | |
| networks: | |
| - agent_network |
This file contains hidden or 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 | |
| namespace app\controllers; | |
| use Yii; | |
| use yii\filters\AccessControl; | |
| use yii\web\Controller; | |
| use yii\web\Response; | |
| use yii\filters\VerbFilter; | |
| use app\models\LoginForm; |
This file contains hidden or 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 | |
| use yii\helpers\Html; | |
| use yii\widgets\LinkPager; | |
| ?> | |
| <h1>Countries</h1> | |
| <ul> | |
| <?php foreach ($countries as $country): ?> | |
| <li> | |
| <?= Html::encode("{$country->name} ({$country->code})") ?>: |
This file contains hidden or 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 | |
| namespace app\models; | |
| use yii\db\ActiveRecord; | |
| class Country extends ActiveRecord | |
| { | |
| } |
This file contains hidden or 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
| ` | |
| CREATE TABLE `country` ( | |
| `code` CHAR(2) NOT NULL PRIMARY KEY, | |
| `name` CHAR(52) NOT NULL, | |
| `population` INT(11) NOT NULL DEFAULT '0' | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
| INSERT INTO `country` VALUES ('AU','Australia',18886000); | |
| INSERT INTO `country` VALUES ('BR','Brazil',170115000); | |
| INSERT INTO `country` VALUES ('CA','Canada',1147000); |
This file contains hidden or 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
| # version: "3" # version คือ การระบุว่าจะใช้รูป Compose file เวอร์ชันไหน | |
| # services: # services จะมีกี่ container ที่ต้องการใช้เอามาระบุตรงนี้ โดยในตัวอย่างจะมี 2 services คือ php และ db | |
| # #PHP Service | |
| # php: # ชื่อ service | |
| # container_name: php # กำหนดชื่อ container | |
| # build: # build คือ การบอกว่าให้ใช้ image ที่สร้างจาก Dockerfile | |
| # context: ./ | |
| # dockerfile: Dockerfile # dockerfile ชื่อ Dockerfile | |
| # ports: | |
| # # ports เป็นการทำ port mapping ระหว่าง host กับ container เหมือนตอน docker run -p |
This file contains hidden or 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 { Layout, Menu, Breadcrumb } from 'antd'; | |
| const { Header, Content, Footer } = Layout; | |
| export default () => ( | |
| <div>Hello World.</div> | |
| ) |