<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Container Mamager | masao-Tec-blog</title>
	<atom:link href="https://masao-tec.com/tag/container-mamager/feed/" rel="self" type="application/rss+xml" />
	<link>https://masao-tec.com</link>
	<description>メーカー系Sier会社に勤めるサラリーマンである筆者が、ホームネットワークの構築を通して得られたノウハウを、自己の備忘録も兼ねてわかりやすく紹介するブログです。</description>
	<lastBuildDate>Wed, 06 Aug 2025 10:03:34 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://masao-tec.com/wp-content/uploads/2022/01/cropped-monitor-2004457_1280-32x32.png</url>
	<title>Container Mamager | masao-Tec-blog</title>
	<link>https://masao-tec.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Synology NASにDockerでWordPressサイトを構築する手順｜初心者向け完全ガイド</title>
		<link>https://masao-tec.com/building-a-wordpress-site-using-docker-on-synoloy-nas/</link>
		
		<dc:creator><![CDATA[masao]]></dc:creator>
		<pubDate>Mon, 06 Jun 2022 06:46:21 +0000</pubDate>
				<category><![CDATA[Synology NAS 応用]]></category>
		<category><![CDATA[Container Mamager]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[docker-compose]]></category>
		<category><![CDATA[DSM]]></category>
		<category><![CDATA[DSM7.2]]></category>
		<category><![CDATA[NAS]]></category>
		<category><![CDATA[Synology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://masao-tec.com/?p=2499</guid>

					<description><![CDATA[以下の記事で、Synology NASのDSM（DiskStation Manager)で提供されているWordPressパッケージを用いてWebサイトを構築する手順について紹介しています。 参考　Synology NA [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-cocoon-blocks-tab-box-1 blank-box bb-tab bb-point block-box has-background has-watery-blue-background-color">
<p>Synology NASでのWordPress Webサイトの構築方法として、Synologyのパッケージを用いる方法および、WordPress.orgからダウンロードしたWordPressを用いて構築する方法を紹介してきましたが、第3の方法として、Synology DSMで提供されている、Container ManagerパッケージをインストールしてDockerコンテナとしてWordPress Webサイトを構築する方法について紹介します。</p>
</div>



<div class="wp-block-cocoon-blocks-tab-box-1 blank-box bb-tab bb-check block-box has-text-color has-border-color has-red-color has-red-border-color">
<p>Synonogy DSM7.2より、DockerパッケージがContainer Managerに変更となり、大幅に機能向上しました。WebStationとの連携も簡単にできるようになったため、今後は複数のWordPressサイトを構成する場合は、本手順を標準とすることとしたいと思います。本ブログサイトも本手順で構築したWordPress実行環境に移行しています。</p>
</div>



<p>以下の記事で、Synology NASのDSM（DiskStation Manager)で提供されているWordPressパッケージを用いてWebサイトを構築する手順について紹介しています。</p>



<p><span class="badge">参考</span>　Synology NASでのWordPressを用いたWebサイト構築</p>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-detail">

<a href="https://masao-tec.com/website-construction-using-wordpress-on-synology-nas/" title="Synology NASでのWordPressを用いたWebサイト構築" class="blogcard-wrap internal-blogcard-wrap a-wrap cf" target="_blank"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img decoding="async" width="160" height="90" src="https://masao-tec.com/wp-content/uploads/2022/02/wordpress-581849_1280-320x180.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://masao-tec.com/wp-content/uploads/2022/02/wordpress-581849_1280-320x180.jpg 320w, https://masao-tec.com/wp-content/uploads/2022/02/wordpress-581849_1280-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/02/wordpress-581849_1280-640x360.jpg 640w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">Synology NASでのWordPressを用いたWebサイト構築</div><div class="blogcard-snippet internal-blogcard-snippet">Sylogogy NASでWordPressを用いたWebサイトの構築を行います。WordPressを実行するためには、実行環境としてLAMP環境（「Linux」、「Apache」、「MySQL」、「PHP」）を構築することが必要となりますが、Synology NASではインストーラーにより簡単にインストールすることが出来ます。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img decoding="async" src="https://www.google.com/s2/favicons?domain=https://masao-tec.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">masao-tec.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2022.02.13</div></div></div></div></a>
</div>



<p><strong>WordPress</strong>（<strong>ワードプレス</strong>）は<strong>PHP</strong>というプログラミング言語で作られている<strong>CMS</strong>（<strong>コンテンツマネジメントシステム</strong>）の一種で、ブログやWebサイトを作る事ができます。<br>&nbsp;WordPressを実行するためには、実行環境として<strong>LAMP環境</strong>を構築することが必要となります。<br><strong>LAMP環境</strong>とは「<strong>Linux</strong>」、「<strong>Apache</strong>」、「<strong>MySQL</strong>」、「<strong>PHP</strong>」の4つの<strong>オープンソース</strong>でWebシステムを開発する環境のことをいいます。<br>Synology NASのOSである<strong>DSM</strong>（<strong>DiskStation Manager</strong>)は、LinuxベースのOSであるため、残り３つの「<strong>Apache</strong>」、「<strong>MySQL</strong>」、「<strong>PHP</strong>」をインストールする必要があります。<br>本記事では、これらのインストール手順を、Synology DSMで提供している<strong>Container Manager</strong>、および当該パッケージで提供される<strong>プロジェクト機能</strong>を用いてインストール、セットアップする手順を紹介します。</p>



<p><span class="badge-green">前提</span>　本記事でのDSM(OS)バージョンは、<strong>Synology DSM 7.2</strong>&nbsp;を用いています。</p>



<div class="wp-block-cocoon-blocks-icon-box common-icon-box block-box information-box">
<p>Synology NASのDSM（DiskStation Manager)で提供されているWordPressパッケージの場合、NAS上に<strong><span class="bold-red">Webサイトを１つしか構築できません</span></strong>が、本手順のインストール方法の場合はNAS上に複数のWebサイトを構築することが出来ます。<br>また、DSMのWordPressパッケージ版の場合は、<strong><span class="bold-red">WordPressのバージョンアップがされないようにロックされています</span></strong>が、本手順のインストール方法の場合はそのような制約もありません。</p>
</div>




  <div id="toc" class="toc tnt-none toc-center tnt-none border-element"><input type="checkbox" class="toc-checkbox" id="toc-checkbox-2" checked><label class="toc-title" for="toc-checkbox-2">目次</label>
    <div class="toc-content">
    <ul class="toc-list open"><li><a href="#toc1" tabindex="0">1.Container Managerについて</a></li><li><a href="#toc2" tabindex="0">2.Container Managerパッケージのインストール</a></li><li><a href="#toc3" tabindex="0">3.Container Managerを用いたWordPressサイトの構築</a><ul><li><a href="#toc4" tabindex="0">3-1.ドメイン名の取得</a></li><li><a href="#toc5" tabindex="0">3-2.プロジェクトフォルダの作成</a></li><li><a href="#toc6" tabindex="0">3-3.Container Managerのプロジェクト作成</a></li></ul></li><li><a href="#toc7" tabindex="0">4.WordPressのセットアップとその他設定</a><ul><li><a href="#toc8" tabindex="0">4-1.Redisオブジェクトキャッシュの設定</a></li></ul></li><li><a href="#toc9" tabindex="0">5.Dockerコンテナの更新</a></li><li><a href="#toc10" tabindex="0">6.プロジェクトの削除</a></li><li><a href="#toc11" tabindex="0">7.複数WordPressサイトの構築時の対応</a></li><li><a href="#toc12" tabindex="0">8.まとめ</a></li></ul>
    </div>
  </div>

<h2 class="wp-block-heading"><span id="toc1">1.Container Managerについて</span></h2>



<p>Synology NAS の一部のモデルでは、<strong>Container Manager</strong>というコンテナ型の仮想化実行基盤のパッケージを使用することが出来ます。同じく一部のモデルで使用可能である<strong>Virtual Machine Manager</strong>という仮想化のパッケージもありますが、両者の違いは、<strong>Virtual Machine Manager</strong>はDSM（Synology NASのOS）上に<strong>ハイパーバイザー</strong>という仮想化基盤階層を介して仮想化対象のOSを丸ごとゲストOSとして構築するのに対し、コンテナ型仮想化はDSM上に<strong>Docker Engine</strong>という仮想化基盤階層を介して、仮想化対象の部分はOSであるDSMを共有し、ミドルウエアおよびアプリケーション階層部分のみ仮想化します。ハイパーバイザー型よりコンテナ型のほうが、ゲストOS階層部分がないことより<span class="marker-under">軽量に動作する</span>メリットがあります。</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="800" height="450" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c000-800x450.jpg" alt="" class="wp-image-4025" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c000-800x450.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c000-500x281.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c000-300x169.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c000-768x432.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c000-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c000-320x180.jpg 320w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c000-640x360.jpg 640w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c000.jpg 1280w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>また、<strong>Docker</strong>では、<strong>Docker HUB</strong>という、コンテナイメージを配布する公開ライブラリより、各種アプリケーションがミドルウェアと組み合わされて設定済となっているコンテナイメージが様々なデベロッパーより公開されており、これらのイメージをダウンロードすることにより<span class="marker-under">簡単に各種アプリケーションの実行環境を構築することが出来ます。</span></p>



<p>Synologyの<strong>Container Manager</strong>パッケージでは、これらのコンテナイメージのダウンロード、ダウンロードしたイメージからコンテナを生成し、<span class="marker-under">アプリケーションの実行・管理をGUIで出来る</span>機能が提供されています。</p>



<h2 class="wp-block-heading"><span id="toc2">2.Container Managerパッケージのインストール</span></h2>



<p>DSMコンソールにログインし、［<strong>パッケージセンター</strong>］より［<strong>Container Manager</strong>] をインストールします。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="446" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c001-800x446.jpg" alt="" class="wp-image-4070" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c001-800x446.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c001-500x279.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c001-300x167.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c001-768x428.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c001-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c001.jpg 1192w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>初期設定は特になく、インストールが終わったら完了です。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="457" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c002-800x457.jpg" alt="" class="wp-image-4027" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c002-800x457.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c002-500x285.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c002-300x171.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c002-768x438.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c002.jpg 1193w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p><strong>Container Manager</strong>パッケージのインストールと同時に、NASの共有フォルダ領域に［<strong>Docker</strong>］というフォルダが新規に作成されます。この領域はコンテナの「<strong>データ永続化</strong>」領域として使用されます。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="446" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c003-800x446.jpg" alt="" class="wp-image-4028" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c003-800x446.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c003-500x279.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c003-300x167.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c003-768x428.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c003-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c003.jpg 1004w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>Dockerコンテナはその仕組み上、コンテナが生成・実行されたあと、コンテナを停止・破棄すると内部で生成されたデータも破棄と同時に消滅します。例えば、WordPressのWebサイトを実行するコンテナを生成したとして、Webサイトのテーマやプラグインをインストールし、記事を作成しても、コンテナを停止・破棄するとすべて消滅してしまいます。これでは困るので、データとして残しておきたい領域を「<strong>データ永続化</strong>」領域としてディスク上の領域を割り当てた状態でコンテナを生成することで、当該領域にデータを保存し、コンテナを停止・破棄したあとに再生成したときも「<strong>データ永続化</strong>」領域を割りつけることにより継続的にデータを使用できるようにします。</p>



<h2 class="wp-block-heading"><span id="toc3">3.Container Managerを用いたWordPressサイトの構築</span></h2>



<p><strong>Container Manager</strong>を用いてWordPressのWebサイトを構築する手順を紹介します。</p>



<p><strong>Container Manager</strong>のプロジェクト機能を用いて複数のコンテナを一括して構築する手順とします。</p>



<h3 class="wp-block-heading"><span id="toc4">3-1.ドメイン名の取得</span></h3>



<p>コンテナで生成されたWordPressサイトにアクセスするためのドメイン名の取得と、HTTPS化のためのSSL証明書の取得を行います。</p>



<p>本番用のドメイン名であれば以下の記事を参考にしてドメイン名とSSL証明書の取得を行います。</p>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-related">

<a href="https://masao-tec.com/websites-built-with-synology-nas-have-their-own-domain-settings-and-lets-encrypt-https-settings/" title="Synology NASで構築したWebサイトに独自ドメイン設定およびLet&#039;s EncryptによるHTTPS化設定" class="blogcard-wrap internal-blogcard-wrap a-wrap cf" target="_blank"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://masao-tec.com/wp-content/uploads/2022/02/https-3344700_1280-320x180.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://masao-tec.com/wp-content/uploads/2022/02/https-3344700_1280-320x180.jpg 320w, https://masao-tec.com/wp-content/uploads/2022/02/https-3344700_1280-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/02/https-3344700_1280-640x360.jpg 640w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">Synology NASで構築したWebサイトに独自ドメイン設定およびLet's EncryptによるHTTPS化設定</div><div class="blogcard-snippet internal-blogcard-snippet">SSL(Secure Sockets Layer)とは、インターネット上でのWebブラウザとWebサーバー間の通信を暗号化し、データをやりとりする仕組みのことです。SSL対応されているWebサイトは、URLが「https://」となります。Webサイトを運営するにあたりHTTPS化は必須となっていますので、本記事ではSynology NASで構築したWebサイトに独自ドメインを設定し、Let&#039;s Encryptによる常時HTTPS化設定を行います。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img decoding="async" src="https://www.google.com/s2/favicons?domain=https://masao-tec.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">masao-tec.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2022.02.15</div></div></div></div></a>
</div>



<p>テスト用環境などであれば以下の記事を参考にしてドメイン名と、SSL証明書の取得を行います。</p>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-related">

<a href="https://masao-tec.com/domain-name-setting-by-mydns-jp/" title="MyDNS.JPによるドメイン名の設定" class="blogcard-wrap internal-blogcard-wrap a-wrap cf" target="_blank"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-320x180.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-320x180.jpg 320w, https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-500x282.jpg 500w, https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-800x452.jpg 800w, https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-300x169.jpg 300w, https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-768x434.jpg 768w, https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-1536x867.jpg 1536w, https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-640x360.jpg 640w, https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160-1144x646.jpg 1144w, https://masao-tec.com/wp-content/uploads/2021/12/monitor-g3e349db44_1920-e1643378805160.jpg 1920w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">MyDNS.JPによるドメイン名の設定</div><div class="blogcard-snippet internal-blogcard-snippet">SynologyのDDNSにドメイン名を設定してインターネットからアクセスできるように設定しましたが、このドメイン名はNASアクセス専用とし、ブログサイト用のドメイン名は別の名称としたい。しかし、SynologyのDDNSについてはNAS1台につき1つのドメイン名しか設定できません。よって、別のDDNSにドメイン名を設定して外部からのドメイン名アクセスができるようにします。ここではDDNSとして「MyDNS.JP」サービスを利用してSynologyNASにドメイン名を設定する手順を記載します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img decoding="async" src="https://www.google.com/s2/favicons?domain=https://masao-tec.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">masao-tec.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2021.12.12</div></div></div></div></a>
</div>



<p>また、必要に応じて［内向きDNSの設定］も行います。</p>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-related">

<a href="https://masao-tec.com/synology-nas-inward-dns-settings/" title="Synology NAS 内向きDNSの設定" class="blogcard-wrap internal-blogcard-wrap a-wrap cf" target="_blank"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings-320x180.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings-320x180.jpg 320w, https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings-500x281.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings-800x450.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings-300x169.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings-768x432.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings-640x360.jpg 640w, https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings-1144x644.jpg 1144w, https://masao-tec.com/wp-content/uploads/2022/03/synology-nas-inward-dns-settings.jpg 1280w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">Synology NAS 内向きDNSの設定</div><div class="blogcard-snippet internal-blogcard-snippet">DDNSから取得できるIPアドレスは、インターネット側からアクセスできるグローバルアドレスとなり、このアドレスを使用してローカルLAN内のデバイスからSynology NASへのアクセスはできないため、ローカルLAN内では、DDNSで設定したのと同じドメイン名でローカルIPアドレスを取得できるように、内向きDNSを設定します。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img decoding="async" src="https://www.google.com/s2/favicons?domain=https://masao-tec.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">masao-tec.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2022.03.11</div></div></div></div></a>
</div>



<h3 class="wp-block-heading"><span id="toc5">3-2.プロジェクトフォルダの作成</span></h3>



<p>DSMコンソールより［<strong>FileStation</strong>］を起動し、［<strong>Docker</strong>］共有フォルダ以下に[<strong>wordpress1</strong>]フォルダを作成します。</p>



<figure class="wp-block-image aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="800" height="447" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c004-800x447.jpg" alt="" class="wp-image-4032" style="width:800px;height:auto" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c004-800x447.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c004-500x279.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c004-300x168.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c004-768x429.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c004-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c004-320x180.jpg 320w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c004.jpg 1001w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>次に、作成した［<strong>wordpress1</strong>］フォルダの直下に以下4つのフォルダを作成します。</p>



<ul class="wp-block-list">
<li><strong>conf</strong>：コンテナで使用する定義ファイルの格納用</li>



<li><strong>db</strong>：mariadbデータベースのデータ格納用</li>



<li><strong>redis</strong>：redisオブジェクトキャッシュのデータ格納用</li>



<li><strong>wp</strong>：WordPressのコンテンツ格納用</li>
</ul>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="448" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c005-800x448.jpg" alt="" class="wp-image-4033" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c005-800x448.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c005-500x280.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c005-300x168.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c005-768x430.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c005-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c005-320x180.jpg 320w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c005.jpg 1002w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>更に、[<strong>wordpress1]</strong>フォルダの中に、 [<strong>docker-compose.yml</strong>]ファイルの作成を行います。<br>内容は以下の通りです。<br>作業用のPCでメモ帳などのエディタで作成し、［<strong>FileStation</strong>］でアップロードします。</p>



<pre class="wp-block-code plaintext"><code>version: '3.9'
services:
  wordpress:
    image: wordpress:latest
    container_name:  <span class="red">wordpress1</span>_wp
    hostname: wordpress
    ports:
      - <span class="red">8080</span>:80
    depends_on:
      db:
        condition: service_started
      redis:
        condition: service_healthy
    volumes:
      - ./wp:/var/www/html:rw,Z
      - ./conf/php.ini:/usr/local/etc/php/conf.d/php.ini:ro,Z
      - ./conf/headers.load:/etc/apache2/mods-enabled/headers.load:ro,Z
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
    restart: on-failure:5

  db:
    image: mariadb:10.11
    container_name: <span class="red">wordpress1</span>_db
    security_opt:
      - no-new-privileges:true
    hostname: db
    healthcheck:
     test: &#091;"CMD-SHELL", "mysqladmin ping -P 3306 -proot | grep 'mysqld is alive' || exit 1"]
    environment:
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
      MYSQL_ROOT_PASSWORD: root
      TZ: Asia/Tokyo
    volumes:
      - ./db:/var/lib/mysql:rw,Z
    restart: on-failure:5

  redis:
    image: redis/redis-stack:latest
    hostname: redis
    container_name: <span class="red">wordpress1</span>_redis
    healthcheck:
     test: &#091;"CMD-SHELL", "redis-cli ping || exit 1"]
    environment:
      TZ: Asia/Tokyo
    volumes:
    - ./redis:/data:rw,Z
    restart: on-failure:5</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="446" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c007-800x446.jpg" alt="" class="wp-image-4037" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c007-800x446.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c007-500x279.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c007-300x167.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c007-768x428.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c007-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c007.jpg 1003w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>[<strong>wordpress1/conf</strong>]フォルダの中に、 [<strong><strong>headers.load</strong></strong>]ファイル、および、［<strong>php.ini</strong>］ファイルの作成を行います。<br> [<strong>docker-compose.yml</strong>]ファイルと同様、作業用のPCでメモ帳などのエディタで作成し、［<strong>FileStation</strong>］でアップロードします。</p>



<p>それぞれ、内容は以下の通りとなります。</p>



<p>・ [<strong><strong>headers.load</strong></strong>]</p>



<pre class="wp-block-code plaintext"><code>LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so</code></pre>



<p>・［<strong>php.ini</strong>］</p>



<pre class="wp-block-code plaintext"><code>upload_max_filesize=5120M
post_max_size=5120M
memory_limit=256M
max_execution_time=300
max_input_time=300

opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.jit=1205
opcache.jit_buffer_size=16M</code></pre>



<p>php.iniの設定値はWordPressのバックアップデータをインポートするためのプラグインである「<strong>All-in-One Migration</strong>」でインポート容量制限を回避するためのものとなります。</p>



<p>詳細は以下の記事を参考にして下さい。</p>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-reference">

<a href="https://masao-tec.com/sbackup-with-synology-nas-wordpress-all-in-one-migration/" title="Synology NAS WordPress All-in-One Migrationによるバックアップ" class="blogcard-wrap internal-blogcard-wrap a-wrap cf" target="_blank"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://masao-tec.com/wp-content/uploads/2022/03/wordpress-923188_1280-320x180.jpg" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://masao-tec.com/wp-content/uploads/2022/03/wordpress-923188_1280-320x180.jpg 320w, https://masao-tec.com/wp-content/uploads/2022/03/wordpress-923188_1280-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/03/wordpress-923188_1280-640x360.jpg 640w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">Synology NAS WordPress All-in-One Migrationによるバックアップ</div><div class="blogcard-snippet internal-blogcard-snippet">WordPressのWebサイトのバックアップについて調査・検討し、評価の高い［All In One WP Migration］というプラグインを用いてバックアップを行うこととしました。また［All In One WP Migration］を使用するにあたり、アップロードファイルの容量制限を回避する手段について調査しました。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img decoding="async" src="https://www.google.com/s2/favicons?domain=https://masao-tec.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">masao-tec.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2022.03.08</div></div></div></div></a>
</div>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="447" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c008-800x447.jpg" alt="" class="wp-image-4038" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c008-800x447.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c008-500x279.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c008-300x167.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c008-768x429.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c008-240x135.jpg 240w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c008-320x180.jpg 320w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c008.jpg 1005w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>最終的に、プロジェクトフォルダのフォルダ、ファイル構成は以下のようになります。</p>



<pre class="wp-block-code plaintext"><code>wordpress1/
    conf/
        headers.load
        php.ini
    db/
    redis/
    wp/
    docker_compose.yml</code></pre>



<h3 class="wp-block-heading"><span id="toc6">3-3.Container Managerのプロジェクト作成</span></h3>



<p><strong>Container Manager</strong>の[<strong>プロジェクト</strong>]＞[<strong>作成</strong>]をクリックし、[<strong>プロジェクトを作成</strong>]ダイアログにて以下を入力します。</p>



<ul class="wp-block-list">
<li>プロジェクト名：<strong>wordpress1</strong></li>



<li>パス：<strong>3-2で作成したプロジェクトフォルダ</strong>を選択（プロジェクトフォルダを選択すると既存の[<strong>docker-compose.yml</strong>]がある旨のダイアログが表示されるので、［<strong>既存のdocker-compose.ymlを使用してプロジェクトを作成</strong>］を選択してOKをクリックします）</li>
</ul>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="467" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c009-800x467.jpg" alt="" class="wp-image-4044" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c009-800x467.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c009-500x292.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c009-300x175.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c009-768x448.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c009.jpg 1194w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="458" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c010-800x458.jpg" alt="" class="wp-image-4045" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c010-800x458.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c010-500x286.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c010-300x172.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c010-768x439.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c010.jpg 1189w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>全般設定の画面で内容を確認し、［<strong>次へ</strong>]をクリックします。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="456" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c011-800x456.jpg" alt="" class="wp-image-4047" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c011-800x456.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c011-500x285.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c011-300x171.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c011-768x438.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c011.jpg 1194w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>Webポータル設定の画面で、[<strong>ウェブポータルをWeb Station経由でセットアップ</strong>]にチェックを入れます。<br>これにより、Web Stationで<strong>wordpressコンテナ</strong>をコンテンツとして管理することができるようになります。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="455" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c012-800x455.jpg" alt="" class="wp-image-4048" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c012-800x455.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c012-500x284.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c012-300x171.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c012-768x437.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c012.jpg 1194w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>要約の画面で設定内容が表示されるので、内容確認してから[<strong>完了</strong>]をクリックします。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="458" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c013-800x458.jpg" alt="" class="wp-image-4050" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c013-800x458.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c013-500x286.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c013-300x172.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c013-768x440.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c013.jpg 1193w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>[<strong>docker-compose.yml</strong>]ファイルの内容に従い、コンテナイメージがレジストリからダウンロードされ、<strong>wordpress、mariadb</strong>、<strong>redis</strong>のコンテナが生成されます。</p>



<p>続いて、<strong>Web Station</strong>に進んでウェブポータルの設定を行うよう促すダイアログが表示されるので、[<strong>OK</strong>]をクリックします。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="457" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c014-800x457.jpg" alt="" class="wp-image-4052" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c014-800x457.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c014-500x286.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c014-300x172.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c014-768x439.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c014.jpg 1193w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>Web Stationのウェブサービスポータルをセットアップダイアログに遷移するので、ここで設定を行います。</p>



<p><strong>ホスト名（ドメイン名）</strong>については予め取得済であるものとします。</p>



<p>設定内容を入力したら「<strong>作成</strong>」をクリックします。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="384" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c015-800x384.jpg" alt="" class="wp-image-4054" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c015-800x384.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c015-500x240.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c015-300x144.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c015-768x369.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c015.jpg 1198w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>Web StationでWebポータルが設定され、<strong>ホスト名(ドメイン名）</strong>で[<strong>wordpress1</strong>]コンテナにアクセスできるようになります。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="383" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c016-800x383.jpg" alt="" class="wp-image-4056" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c016-800x383.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c016-500x240.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c016-300x144.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c016-768x368.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c016.jpg 1194w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p><strong>Conainer Manager</strong>に戻ると、［<strong>wordpress1</strong>]プロジェクトが起動され、正常動作していることがわかります。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="268" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c018-800x268.jpg" alt="" class="wp-image-4058" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c018-800x268.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c018-500x168.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c018-300x101.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c018-768x258.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c018.jpg 1189w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>［<strong>wordpress1</strong>]プロジェクト内には３つのコンテナが起動しています。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="457" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c017-800x457.jpg" alt="" class="wp-image-4059" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c017-800x457.jpg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c017-500x286.jpg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c017-300x171.jpg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c017-768x439.jpg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c017.jpg 1190w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<div class="wp-block-cocoon-blocks-icon-box common-icon-box block-box alert-box">
<p>コンテナ起動時、dbのコンテナの初期起動完了までに時間がかかることがあります。以下に示すように、コンテナが暫くの間、異常状態（オレンジ表示）を示しますが、この場合、暫く（以下例では１５分程度）待つと正常状態（緑表示）になります。（データベースの初期生成を行っているようです。）</p>
</div>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="241" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c030-800x241.png" alt="" class="wp-image-4205" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c030-800x241.png 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c030-500x151.png 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c030-300x90.png 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c030-768x231.png 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c030.png 1192w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="261" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c031-800x261.png" alt="" class="wp-image-4206" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c031-800x261.png 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c031-500x163.png 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c031-300x98.png 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c031-768x250.png 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c031.png 1191w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>Webポータルが作成されたら、<strong>ホスト名（ドメイン名）</strong>に適合する証明書を設定します。</p>



<p>［<strong>コントロールパネル</strong>］＞［<strong>セキュリティ</strong>］＞［<strong>証明書</strong>］＞［<strong>設定</strong>］をクリックし、設定ダイアログを表示します。</p>



<p><strong>ホスト名（ドメイン名）</strong>がサービスとして表示されていますので、証明書プルダウンからドメイン名に適合した合したSSL証明書を選択します。</p>



<p>［<strong>OK</strong>］をクリックして設定を完了させます。</p>



<figure class="wp-block-image aligncenter size-medium"><img loading="lazy" decoding="async" width="500" height="349" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c019-1-500x349.jpeg" alt="" class="wp-image-4063" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c019-1-500x349.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c019-1-300x210.jpeg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c019-1.jpeg 597w" sizes="(max-width: 500px) 100vw, 500px" /></figure>



<h2 class="wp-block-heading"><span id="toc7">4.WordPressのセットアップとその他設定</span></h2>



<p>ブラウザのURLに<strong>ホスト名（ドメイン名）</strong>を入力してWebサイトにアクセスすると、WordPressの初期画面が表示されます。</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="800" height="521" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c020-800x521.jpeg" alt="" class="wp-image-4067" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c020-800x521.jpeg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c020-500x326.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c020-300x195.jpeg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c020-768x500.jpeg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c020-1536x1001.jpeg 1536w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c020.jpeg 1633w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>上記が表示されたら、画面内容に従ってWordPressの初期設定を行っていきます。</p>



<h3 class="wp-block-heading"><span id="toc8">4-1.Redisオブジェクトキャッシュの設定</span></h3>



<p>本プロジェクトでは、Redisサーバを設定しているので、WordPressからRedisサーバに接続する設定を行います。</p>



<p><strong>wp-config.php</strong>に以下を追記します。</p>



<pre class="wp-block-code plaintext"><code>define( 'WP_REDIS_HOST', 'redis');</code></pre>



<p><strong>wp-config.php</strong>はプロジェクトフォルダのwp以下あるので、FileStationで[<strong>テキストエディタで開く</strong>]で編集して設定を保存します。 </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="447" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c023-800x447.jpeg" alt="" class="wp-image-4074" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c023-800x447.jpeg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c023-500x279.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c023-300x168.jpeg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c023-768x429.jpeg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c023-240x135.jpeg 240w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c023-320x180.jpeg 320w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c023.jpeg 1001w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>WordPressの初期設定後、プラグインとして［<strong>Redis Object Cache</strong>］をインストール、有効化します。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="584" height="429" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c021.jpeg" alt="" class="wp-image-4075" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c021.jpeg 584w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c021-500x367.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c021-300x220.jpeg 300w" sizes="(max-width: 584px) 100vw, 584px" /></figure>



<p>WordPressのダッシュボードより［<strong>設定</strong>］＞［<strong>Redis</strong>］でRedisの管理画面を表示させ、［<strong>Enable Object Cache</strong>］をクリックしてObject Cacheを有効化させます。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="477" height="351" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c022.jpeg" alt="" class="wp-image-4076" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c022.jpeg 477w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c022-300x221.jpeg 300w" sizes="(max-width: 477px) 100vw, 477px" /></figure>



<h2 class="wp-block-heading"><span id="toc9">5.Dockerコンテナの更新</span></h2>



<p>コンテナイメージとして［<strong>latest</strong>］を選択していた場合、コンテナ生成時点での最新バージョンがダウンロードされますが、レジストリの最新バージョンが更新されると、イメージに［<span class="blue"><strong>アップデートがあります</strong></span>］の表示がされます。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="251" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c024-800x251.jpeg" alt="" class="wp-image-4079" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c024-800x251.jpeg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c024-500x157.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c024-300x94.jpeg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c024-768x241.jpeg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c024.jpeg 1195w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>リンクをクリックすると［<strong>イメージをアップデート</strong>］画面が表示されます。［<strong>アップデート</strong>］をクリックすると、イメージの最新バージョンのダウンロードと、最新バージョンに基づいたコンテナの再生成が実行されます。</p>



<figure class="wp-block-image aligncenter size-medium"><img loading="lazy" decoding="async" width="500" height="413" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c025-500x413.jpeg" alt="" class="wp-image-4080" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c025-500x413.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c025-300x248.jpeg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c025.jpeg 595w" sizes="(max-width: 500px) 100vw, 500px" /></figure>



<p>コンテナの再生成中はWordPressの動作は停止しますので、公開中のブログサイトの場合は更新タイミングを考慮する必要があります。</p>



<h2 class="wp-block-heading"><span id="toc10">6.プロジェクトの削除</span></h2>



<p>不要となったプロジェクトは以下の手順で削除します。</p>



<p>［<strong>コンテナマネージャ</strong>］＞［<strong>プロジェクト</strong>］でプロジェクトを選択し、［<strong>停止</strong>］をクリックします。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="294" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c026-800x294.jpeg" alt="" class="wp-image-4084" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c026-800x294.jpeg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c026-500x184.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c026-300x110.jpeg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c026-768x282.jpeg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c026.jpeg 1191w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>プロジェクト内のコンテナがすべて停止したら、[<strong>操作</strong>]＞［<strong>削除</strong>］を選択し、 プロジェクトの削除を行います。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="235" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c027-800x235.jpeg" alt="" class="wp-image-4085" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c027-800x235.jpeg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c027-500x147.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c027-300x88.jpeg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c027-768x226.jpeg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c027.jpeg 1290w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p><strong>Web Station</strong>のWebポータルは自動的に削除されないため、こちらの削除も行います。</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="800" height="384" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c028-800x384.jpeg" alt="" class="wp-image-4086" style="width:804px;height:auto" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c028-800x384.jpeg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c028-500x240.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c028-300x144.jpeg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c028-768x369.jpeg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c028.jpeg 1196w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>プロジェクトフォルダも不要であれば<strong>File Station</strong>より削除します。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="800" height="346" src="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c029-800x346.jpeg" alt="" class="wp-image-4087" srcset="https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c029-800x346.jpeg 800w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c029-500x216.jpeg 500w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c029-300x130.jpeg 300w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c029-768x332.jpeg 768w, https://masao-tec.com/wp-content/uploads/2022/06/wordpress_c029.jpeg 1004w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>プロジェクトの削除手順についての説明は以上となります。</p>



<h2 class="wp-block-heading"><span id="toc11">7.複数WordPressサイトの構築時の対応</span></h2>



<p>複数のWordPressサイトを構築するときは以下のようにします。</p>



<ul class="wp-block-list">
<li><strong>プロジェクト名</strong>の変更：<strong>wordspress2</strong>などの別名とする。</li>



<li> [<strong>docker-compose.yml</strong>]にて、名称を重複しない名称（例:wordpress2)とし、ポート番号も別の番号（例:8081）とする。（3-2節の[<strong>docker-compose.yml</strong>]にて赤文字で表示している箇所を変更）</li>
</ul>



<p>上記設定で構築することにより、1つ目のWordPressサイトと並列して複数のWordPressサイトを構築することができます。</p>



<h2 class="wp-block-heading"><span id="toc12">8.まとめ</span></h2>



<p>Synology NASで<strong>Container Manager</strong>パッケージのインストールと、<strong>Container Manager</strong>のプロジェクト機能、および<strong>WebStationのウェブサービスポータル</strong>を用いて<strong>WordPress</strong>のWebサイトを構築する手順を紹介しました。</p>



<p><strong>Container Manager</strong>で作成したWordPressのWebサイトはインストール・セットアップも非常に簡単ですし、WebサーバやPHPに<strong>最新バージョンが使用</strong>できること、WordPressが<strong>最新版にアップデートできる</strong>こと、NAS上に<strong>複数のWordPressサイトを構築できる</strong>などメリットが多いため、本インストール手順ををお勧めします。</p>



<p>以上、最後まで記事を読んでいただき、ありがとうございました。</p>


<div class="kattene">
    <div class="kattene__imgpart"><a rel="noopener" target="_blank" href="https://amzn.to/3XFno9P"><img decoding="async" width="160" height="160" loading="lazy" src="https://m.media-amazon.com/images/I/71hN2r+v6QL._AC_SL1500_.jpg" ></a></div>
    <div class="kattene__infopart">
      <div class="kattene__title"><a rel="noopener" target="_blank" href="https://amzn.to/3XFno9P">【NAS用HDD】Synology HAT3300-4T [4TB 3.5 SATA 5,400rpm / NASグレードHDD(MTTF100万時間) / 3年保証]</a></div>
      <div class="kattene__description">Synology</div>
      <div class="kattene__btns __two"><div><a rel="noopener" class="kattene__btn __orange" target="_blank" href="https://amzn.to/3XFno9P">Amazon</a></div><div><a rel="noopener" class="kattene__btn __red" target="_blank" href="https://a.r10.to/hN4D6Y">Rakuten</a></div></div></div></div>


<div class="kattene">
    <div class="kattene__imgpart"><a rel="noopener" target="_blank" href="https://amzn.to/4273eqv"><img decoding="async" width="160" height="160" loading="lazy" src="https://m.media-amazon.com/images/I/71y0UqWIiSL._AC_SL1500_.jpg" ></a></div>
    <div class="kattene__infopart">
      <div class="kattene__title"><a rel="noopener" target="_blank" href="https://amzn.to/4273eqv">Seagate IronWolf 3.5インチ  4TB 内蔵 ハードディスク HDD CMR 6Gb/s 256MB 5400rpm ST4000VN006/EC</a></div>
      <div class="kattene__description">SEAGATE</div>
      <div class="kattene__btns __two"><div><a rel="noopener" class="kattene__btn __orange" target="_blank" href="https://amzn.to/4273eqv">Amazon</a></div><div><a rel="noopener" class="kattene__btn __red" target="_blank" href="https://a.r10.to/hF34Wm">Rakuten</a></div></div></div></div>


<div class="kattene">
    <div class="kattene__imgpart"><a rel="noopener" target="_blank" href="https://www.amazon.co.jp/%E3%80%90NAS%E7%94%A8%E6%8B%A1%E5%BC%B5%E3%83%A1%E3%83%A2%E3%83%AA%E3%80%91Synology-D4NESO-2666-4G-666-SODIMM-Synology-%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E4%BB%A3%E7%90%86%E5%BA%97%E5%93%81/dp/B07X5MMGWG?pd_rd_w=UsYPJ&amp;pf_rd_p=e6abce55-fc6f-4462-923b-b8a729351d49&amp;pf_rd_r=G7HNVA53TGP07FV4YBGW&amp;pd_rd_r=b5e13bb6-c0a4-4dd6-abce-8903827de7c5&amp;pd_rd_wg=KdtA8&amp;pd_rd_i=B07X5MMGWG&amp;psc=1&amp;linkCode=ll1&amp;tag=masaotecblo0b-22&amp;linkId=fc1c31dcfe099df6c1be21329903570e&amp;language=ja_JP&amp;ref_=as_li_ss_tl"><img decoding="async" width="160" height="160" loading="lazy" src="https://m.media-amazon.com/images/I/612ZzLNDauL.__AC_SY300_SX300_QL70_ML2_.jpg" ></a></div>
    <div class="kattene__infopart">
      <div class="kattene__title"><a rel="noopener" target="_blank" href="https://www.amazon.co.jp/%E3%80%90NAS%E7%94%A8%E6%8B%A1%E5%BC%B5%E3%83%A1%E3%83%A2%E3%83%AA%E3%80%91Synology-D4NESO-2666-4G-666-SODIMM-Synology-%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E4%BB%A3%E7%90%86%E5%BA%97%E5%93%81/dp/B07X5MMGWG?pd_rd_w=UsYPJ&amp;pf_rd_p=e6abce55-fc6f-4462-923b-b8a729351d49&amp;pf_rd_r=G7HNVA53TGP07FV4YBGW&amp;pd_rd_r=b5e13bb6-c0a4-4dd6-abce-8903827de7c5&amp;pd_rd_wg=KdtA8&amp;pd_rd_i=B07X5MMGWG&amp;psc=1&amp;linkCode=ll1&amp;tag=masaotecblo0b-22&amp;linkId=fc1c31dcfe099df6c1be21329903570e&amp;language=ja_JP&amp;ref_=as_li_ss_tl">【NAS用拡張メモリ】Synology D4NESO-2666-4G [DDR4-2,666-SODIMM / 4GB / Synology NAS専用] 国内正規代理店品</a></div>
      <div class="kattene__description">Synology</div>
      <div class="kattene__btns __two"><div><a rel="noopener" class="kattene__btn __orange" target="_blank" href="https://www.amazon.co.jp/%E3%80%90NAS%E7%94%A8%E6%8B%A1%E5%BC%B5%E3%83%A1%E3%83%A2%E3%83%AA%E3%80%91Synology-D4NESO-2666-4G-666-SODIMM-Synology-%E5%9B%BD%E5%86%85%E6%AD%A3%E8%A6%8F%E4%BB%A3%E7%90%86%E5%BA%97%E5%93%81/dp/B07X5MMGWG?pd_rd_w=UsYPJ&amp;pf_rd_p=e6abce55-fc6f-4462-923b-b8a729351d49&amp;pf_rd_r=G7HNVA53TGP07FV4YBGW&amp;pd_rd_r=b5e13bb6-c0a4-4dd6-abce-8903827de7c5&amp;pd_rd_wg=KdtA8&amp;pd_rd_i=B07X5MMGWG&amp;psc=1&amp;linkCode=ll1&amp;tag=masaotecblo0b-22&amp;linkId=fc1c31dcfe099df6c1be21329903570e&amp;language=ja_JP&amp;ref_=as_li_ss_tl">Amazon</a></div><div><a rel="noopener" class="kattene__btn __red" target="_blank" href="https://hb.afl.rakuten.co.jp/ichiba/05126964.481bb828.0cc30f1e.c28e1fdc/_RTLink41257?pc=https%3A%2F%2Fproduct.rakuten.co.jp%2Fproduct%2F-%2F4a33334a67b3e6a8244995c1dc112b8d%2F&amp;link_type=hybrid_url&amp;ut=eyJwYWdlIjoiaXRlbSIsInR5cGUiOiJoeWJyaWRfdXJsIiwic2l6ZSI6IjI0MHgyNDAiLCJuYW0iOjEsIm5hbXAiOiJyaWdodCIsImNvbSI6MSwiY29tcCI6ImRvd24iLCJwcmljZSI6MCwiYm9yIjoxLCJjb2wiOjEsImJidG4iOjEsInByb2QiOjEsImFtcCI6ZmFsc2V9">Rakuten</a></div></div></div></div>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
