内容へ移動
fl8 Wiki
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
現在位置:
Dokuwiki.fl8.jp
»
50 日記
»
2021
»
04
»
2021.04.29 Docker dokuwiki linuxserver
トレース:
•
Windows - nslookup
50_dialy:2021:04:29
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== 2021.04.29 Docker dokuwiki linuxserver ====== ※[[50_dialy:2021:12:30]]こちらにも別のdokuwiki こちらのlinuxserverのdokuwikiはnginxで動きます。 SSL付きのDokuwiki [[https://docs.linuxserver.io/images/docker-dokuwiki]] ===== docker-compose.yml ===== <code|docker-compose.yml> --- version: "2.1" services: https-portal: image: steveltn/https-portal:1 ports: - '80:80' - '443:443' links: - dokuwiki #restart: always restart: unless-stopped environment: DOMAINS: 'dokuwiki.fl8.jp -> http://dokuwiki' #STAGE: 'local' STAGE: 'production' #FORCE_RENEW: 'true' dokuwiki: image: ghcr.io/linuxserver/dokuwiki container_name: dokuwiki environment: - PUID=1000 - PGID=1000 - TZ=Asia/Tokyo volumes: - ./config:/config # - /tmpfs:/var/caceh/nginx #ports: # - 80:80 # - 443:443 #optional restart: unless-stopped </code> ===== 起動 ===== <code> # docker-compose up -d </code> このあと下記へアクセス https://[hostname]/install.php ===== tmpfs ===== tmpfsにfastcgi_cacheを置く場合、tmpfsの設定を入れる <code|/etc/fstab> tmpfs /tmpfs tmpfs defaults,size=1024m,noatime,mode=1777 0 0 </code> <code> mkdir /tmpfs mount /tmpfs </code> ===== X-Forwared-For ===== https-portalからforwardされてくるので、X-Forwared-Forからアクセス元IPを取得し、real_ipとしてセットする。 <code|config/nginx/nginx.conf> set_real_ip_from 172.18.0.0/16; real_ip_header X-Forwarded-For; </code> このX-Forwared-Forを入れないと、dockerの場合[[dokuwiki:plugin:counter]]もうまくカウントしてくれない。 ===== FastCGI cache ===== http{}の中にfastcgi_cache_pathとfastcgi_cache_keyの記述を追加 <code|config/nginx/nginx.conf> http { fastcgi_cache_path /var/caceh/nginx levels=1:2 keys_zone=cache-zone:30m max_size=1024M inactive=600m; fastcgi_cache_key "$scheme$request_method$host$request_uri"; </code> <code|config/nginx/site-confs/default> location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # With php5-cgi alone: fastcgi_pass 127.0.0.1:9000; # With php5-fpm: #fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include /etc/nginx/fastcgi_params; set $do_not_cache 0; # -- POST or HEAD ? if ($request_method != "GET") { set $do_not_cache 1; } fastcgi_cache cache-zone; fastcgi_cache_valid 200 60m; add_header X-F-Cache $upstream_cache_status; </code> ===== アクセス制限 ===== [[#X-Forwared-For]]してあれば、real_ipで制限できる。 <code> location / { try_files $uri $uri/ @dokuwiki; allow xxx.xxxx.xxx.xxx; deny all; } </code> ===== Error ===== <code> # docker-compose up -d Starting dokuwiki ... error ERROR: for dokuwiki Cannot start service dokuwiki: oci runtime error: container_linux.go:235: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \"Cannot set property TasksAccounting, or unknown property.\"" ERROR: for dokuwiki Cannot start service dokuwiki: oci runtime error: container_linux.go:235: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \"Cannot set property TasksAccounting, or unknown property.\"" ERROR: Encountered errors while bringing up the project. </code> ==== 対応 ==== 古いバージョンのsystemdにはTaskAccounting が無い これは新しいsystemdにupdateすれば治る <code> # yum update systemd </code> ===== 既存環境からのコピー ===== data、conf、tplのコピー <code> rsync hoge@hogehoge.com:/var/www/html/dokuwiki/data/ config/dokuwiki/data/ rsync hoge@hogehoge.com:/var/www/html/dokuwiki/conf/ config/dokuwiki/conf/ rsync hoge@hogehoge.com:/home/www/public_html/dokuwiki/lib/tpl/dokuwiki/ config/dokuwiki/lib/tpl/dokuwiki/ </code> 後は、既存環境と同じ拡張機能をインストール {{tag>日記 dokuwiki Docker}}
50_dialy/2021/04/29.txt
· 最終更新: 2023/05/17 01:26 by
matsui
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ