前提・実現したいこと
現在、ConohaVPSにて、Dockerを利用したWebサーバーを構築したいと考えております。
OSはCentOS7を利用しており、nginxとWordpressで環境を構築しようと考えています。
そこで、Docker-composeにて定義を記載しているのですが、以下の問題が発生し、うまくいきません。
発生している問題・エラーメッセージ
アクセス時のエラー 503 Service Temporarily Unavailable nginx/1.14.1
ConsoleError
1docker-compose up 2Starting mysql ... done 3Recreating nginx_proxy ... done 4Recreating wp_1 ... done 5Recreating web_letsencrypt-nginx-proxy-companion_1 ... done 6Attaching to mysql, nginx_proxy, wp_1, web_letsencrypt-nginx-proxy-companion_1 7mysql | 2019-02-11T07:49:36.459102Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 8mysql | 2019-02-11T07:49:36.461474Z 0 [Note] mysqld (mysqld 5.7.21) starting as process 1 ... 9mysql | 2019-02-11T07:49:36.465343Z 0 [Note] InnoDB: PUNCH HOLE support available 10・・・文字数制限により省略 11'/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL) 12nginx_proxy | Custom dhparam.pem file found, generation skipped 13nginx_proxy | forego | starting dockergen.1 on port 5000 14nginx_proxy | forego | starting nginx.1 on port 5100 15nginx_proxy | dockergen.1 | 2019/02/11 07:49:36 Error inspecting container: ea19cff1bc5be4c6301bff54547f806757a6d5f30472f6b457b8e244a273a9e9: No such container: ea19cff1bc5be4c6301bff54547f806757a6d5f30472f6b457b8e244a273a9e9 16nginx_proxy | dockergen.1 | 2019/02/11 07:49:36 Watching docker events 17nginx_proxy | dockergen.1 | 2019/02/11 07:49:36 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload' 18nginx_proxy | dockergen.1 | 2019/02/11 07:49:37 Received event start for container c8e9c7699f4f 19nginx_proxy | dockergen.1 | 2019/02/11 07:49:37 Error inspecting container: b726244313d5cc241d6332f128b56ca685498e73ede891255dd237304d9c0c58: No such container: b726244313d5cc241d6332f128b56ca685498e73ede891255dd237304d9c0c58 20nginx_proxy | dockergen.1 | 2019/02/11 07:49:37 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload' 21nginx_proxy | dockergen.1 | 2019/02/11 07:49:37 Error inspecting container: f5dd87efde0168b0625df63d473177cfcc35e2f42ccb9d097a72a7238dce8cd2: No such container: f5dd87efde0168b0625df63d473177cfcc35e2f42ccb9d097a72a7238dce8cd2 22nginx_proxy | dockergen.1 | 2019/02/11 07:49:37 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload' 23wp_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.0.4. Set the 'ServerName' directive globally to suppress this message 24wp_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.0.4. Set the 'ServerName' directive globally to suppress this message 25wp_1 | [Mon Feb 11 07:49:37.489356 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.15 configured -- resuming normal operations 26wp_1 | [Mon Feb 11 07:49:37.489441 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND' 27letsencrypt-nginx-proxy-companion_1 | Info: Custom Diffie-Hellman group found, generation skipped. 28letsencrypt-nginx-proxy-companion_1 | Reloading nginx proxy (cf928d77d9d7e8a12e85d0c8a0a187d11c23364d659af7a90d38069e78f361e6)... 29letsencrypt-nginx-proxy-companion_1 | 2019/02/11 07:49:38 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification '' 30letsencrypt-nginx-proxy-companion_1 | 2019/02/11 07:49:38 [notice] 61#61: signal process started 31letsencrypt-nginx-proxy-companion_1 | 2019/02/11 07:49:38 Generated '/app/letsencrypt_service_data' from 4 containers 32letsencrypt-nginx-proxy-companion_1 | 2019/02/11 07:49:38 Running '/app/signal_le_service' 33letsencrypt-nginx-proxy-companion_1 | 2019/02/11 07:49:38 Watching docker events 34letsencrypt-nginx-proxy-companion_1 | 2019/02/11 07:49:38 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/signal_le_service' 35letsencrypt-nginx-proxy-companion_1 | /etc/nginx/certs/<ドメイン> /app 36letsencrypt-nginx-proxy-companion_1 | Reloading nginx proxy (cf928d77d9d7e8a12e85d0c8a0a187d11c23364d659af7a90d38069e78f361e6)... 37letsencrypt-nginx-proxy-companion_1 | 2019/02/11 07:49:38 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification '' 38letsencrypt-nginx-proxy-companion_1 | 2019/02/11 07:49:38 [notice] 86#86: signal process started 39letsencrypt-nginx-proxy-companion_1 | Creating/renewal <ドメイン> certificates... (<ドメイン>) 40letsencrypt-nginx-proxy-companion_1 | 2019-02-11 07:49:40,612:INFO:simp_le:1479: Generating new certificate private key 41letsencrypt-nginx-proxy-companion_1 | 2019-02-11 07:49:43,148:ERROR:simp_le:1446: CA marked some of the authorizations as invalid, which likely means it could not access http://example.com/.well-known/acme-challenge/X. Did you set correct path in -d example.com:path or --default_root? Are all your domains accessible from the internet? Please check your domains' DNS entries, your host's network/firewall setup and your webserver config. If a domain's DNS entry has both A and AAAA fields set up, some CAs such as Let's Encrypt will perform the challenge validation over IPv6. If your DNS provider does not answer correctly to CAA records request, Let's Encrypt won't issue a certificate for your domain (see https://letsencrypt.org/docs/caa/). Failing authorizations: https://acme-v01.api.letsencrypt.org/acme/authz/EaMASnYu7L-fNkwVZnCVeyZftyxJUDtQML1RShpgSDA 42letsencrypt-nginx-proxy-companion_1 | Challenge validation has failed, see error log. 43letsencrypt-nginx-proxy-companion_1 | 44letsencrypt-nginx-proxy-companion_1 | Debugging tips: -v improves output verbosity. Help is available under --help. 45letsencrypt-nginx-proxy-companion_1 | /app 46letsencrypt-nginx-proxy-companion_1 | Sleep for 3600s
Docker-composeにて記載している内容が以下になります。
Docker-compose.yml
version: '2' services: db: container_name: mysql image: mysql:5.7.21 ports: - 3306:3306 volumes: - /home/web/mysql:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: password restart: always networks: - net-proxy wordpress1: container_name: wp_1 depends_on: - db image: wordpress volumes: - /home/web/wordpress/wp_1/wp-content:/var/www/html/wp-content external_links: - db expose: - 80 environment: # VIRTUAL_HOST: <ドメイン> #WordPresドメイン名 WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_PASSWORD: password LETSENCRYPT_HOST: <ドメイン> LETSENCRYPT_EMAIL: ebonight02@gmail.com # Lets Encrypt restart: always networks: - net-proxy letsencrypt-nginx-proxy-companion: image: jrcs/letsencrypt-nginx-proxy-companion volumes: - /home/web/certs:/etc/nginx/certs:rw - /var/run/docker.sock:/var/run/docker.sock:ro volumes_from: - nginx-proxy restart: always networks: - net-proxy nginx-proxy: container_name: nginx_proxy image: jwilder/nginx-proxy privileged: true ports: - 80:80 - 443:443 volumes: - /etc/nginx/vhost.d - /usr/share/nginx/html - /var/run/docker.sock:/tmp/docker.sock:ro - /home/home/web/certs:/etc/nginx/certs:ro restart: always networks: - net-proxy environment: DEFAULT_HOST: <ドメイン> networks: net-proxy: external: true
正直どこがだめなのか全くわからない状態です。
VPS側のAレコード等は設定済みとなります。
もし何か分かる方いましたらご教示お願いいたします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。