前提・実現したいこと
Docker on kusanagiを利用したwordpressの2020.7段階の最新環境を作成したいです。
kagoyaのHPを見て作成できましたが、バージョンが古かったため、アップデートをしようと思いました。
###フォルダ構成
| /home
| └wordpress
| ├nginx-proxy (マルチサイト& Let’s Encrypt対応)
| │ ├docker-compose.yml
| │ ├nginx.conf
| │ └docker-compose.d
| └kusanagi01 ← KUSANAGI Runs on Docker(WordPressサイト)
| ├docker-compose.yml
| ├uploads.ini
| └data
###試したこと
以下のイメージをdocker pull
primestrategy/kusanagi-php
primestrategy/kusanagi-nginx
mariadb
その後、docker-component.ymlをv2→v3.8へ修正して(volumes_fromが使えなくなっているので、トップレベルvolumesに置き換え)、docker-component up -dを実行までできましたが、HPを確認しようとするとエラーがでます。
###google chromeでのアクセス時のエラー
このサイトにアクセスできません<ドメイン名> のサーバーの IP アドレスが見つかりませんでした。
うまくSSLの認証がうまくいってないようです。
curl 実行時のエラー
curl https://<ホスト名>.<ドメイン名> を実行すると以下のようなメッセージが発生します。
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
どこを調べて問題を切り分けていったらよいのか見当がつかず悩んでおります。
編集前、編集後
元々のkusanagiのdocker-compose.yml(アクセス可能なことを確認済)
version: '2' services: kusanagi-data: image: busybox restart: always stdin_open: true tty: true volumes: - /var/lib/mysql - /etc/nginx/conf.d - /etc/httpd/conf.d - /etc/kusanagi.d - ./data:/home/kusanagi - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini command: /bin/sh kusanagi-nginx: image: primestrategy/kusanagi-nginx:1.10.0-1 environment: VIRTUAL_HOST: www.xxxxxxxx.com VIRTUAL_PORT: 443 VIRTUAL_PROTO: https LETSENCRYPT_HOST: www.xxxxxxxx.com LETSENCRYPT_EMAIL: xxxxxxxx@xxx.com LETSENCRYPT_TEST: "false" PROFILE: xxxxxxxx FQDN: www.xxxxxxxx.com WPLANG: ja BCACHE: "on" FCACHE: "on" volumes_from: - kusanagi-data links: - kusanagi-php7:php - kusanagi-mariadb:mysql ports: - "443" restart: always networks: - common_link kusanagi-mariadb: image: mariadb:10.1.21 environment: MYSQL_ROOT_PASSWORD: xxxxxxxx MYSQL_USER: xxxx MYSQL_PASSWORD: xxxxxxxx MYSQL_DATABASE: xxxxxxxx volumes_from: - kusanagi-data restart: always networks: - common_link kusanagi-php7: image: primestrategy/kusanagi-php7:7.0.6-1 links: - kusanagi-mariadb:mysql volumes_from: - kusanagi-data restart: always networks: - common_link networks: common_link: external: true
####変更後(version3.8)
version: '3.8' services: kusanagi-nginx: image: primestrategy/kusanagi-nginx:latest environment: VIRTUAL_HOST: www.xxxxxxxx.com VIRTUAL_PORT: 443 VIRTUAL_PROTO: https LETSENCRYPT_HOST: www.xxxxxxxx.com LETSENCRYPT_EMAIL: xxxxxxxx@xxx.com LETSENCRYPT_TEST: "false" PROFILE: xxxxxxxx FQDN: www.xxxxxxxx.com WPLANG: ja BCACHE: "on" FCACHE: "on" volumes: - $(pwd)/data:/home/kusanagi - $(pwd)/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini - mysql:/var/lib/mysql - nginxconfd:/etc/nginx/conf.d - httpdconfd:/etc/httpd/conf.d - kusanagid:/etc/kusanagi.d links: - kusanagi-php7:php - kusanagi-mariadb:mysql ports: - "443" restart: always networks: - common_link kusanagi-mariadb: image: mariadb:latest environment: MYSQL_ROOT_PASSWORD: xxxxxxxx MYSQL_USER: xxxx MYSQL_PASSWORD: xxxxxxxx MYSQL_DATABASE: xxxxxxxx volumes: - ./data:/home/kusanagi - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini - mysql:/var/lib/mysql - nginxconfd:/etc/nginx/conf.d - httpdconfd:/etc/httpd/conf.d - kusanagid:/etc/kusanagi.d restart: always networks: - common_link kusanagi-php7: image: primestrategy/kusanagi-php7:latest links: - kusanagi-mariadb:mysql volumes: - ./data:/home/kusanagi - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini - mysql:/var/lib/mysql - nginxconfd:/etc/nginx/conf.d - httpdconfd:/etc/httpd/conf.d - kusanagid:/etc/kusanagi.d restart: always networks: - common_link volumes: mysql: nginxconfd: httpdconfd: kusanagid: networks: common_link: external: true
元々のnginx-proxyのdocker-compose.yml(アクセス可能なことを確認済)
version: '2' services: nginx-proxy: image: jwilder/nginx-proxy container_name: nginx-proxy privileged: true ports: - 80:80 - 443:443 volumes: - ./docker-compose.d/certs:/etc/nginx/certs:ro - ./docker-compose.d/htpasswd:/etc/nginx/htpasswd - /etc/nginx/vhost.d - /usr/share/nginx/html - /var/run/docker.sock:/tmp/docker.sock:ro - ./nginx.conf:/etc/nginx/conf.d/my_proxy.conf restart: always networks: - common_link letsencrypt-nginx: image: jrcs/letsencrypt-nginx-proxy-companion container_name: letsencrypt-nginx privileged: true volumes: - ./docker-compose.d/certs:/etc/nginx/certs:rw - /var/run/docker.sock:/var/run/docker.sock:ro volumes_from: - nginx-proxy restart: always networks: - common_link networks: common_link: external: true
変更後(version 3.8)
version: 3.8' services: nginx-proxy: image: jwilder/nginx-proxy container_name: nginx-proxy privileged: true ports: - 80:80 - 443:443 volumes: - ./docker-compose.d/certs:/etc/nginx/certs:ro - ./docker-compose.d/htpasswd:/etc/nginx/htpasswd - vhost.d:/etc/nginx/vhost.d - html:/usr/share/nginx/html - /var/run/docker.sock:/tmp/docker.sock:ro - ./nginx.conf:/etc/nginx/conf.d/my_proxy.conf restart: always networks: - common_link letsencrypt-nginx: image: jrcs/letsencrypt-nginx-proxy-companion container_name: letsencrypt-nginx privileged: true volumes: - ./docker-compose.d/certs:/etc/nginx/certs:rw - /var/run/docker.sock:/var/run/docker.sock:ro - vhost.d:/etc/nginx/vhost.d - html:/usr/share/nginx/html restart: always networks: - common_link volumes: vhost.d: html: networks: common_link: external: true
補足情報(FW/ツールのバージョンなど)
###docker -v
19.03.12
####docker-compose -v
1.26.0
あなたの回答
tips
プレビュー