dockerfile - docker-compose fails to start lnmp?
巴扎黑
巴扎黑 2017-06-29 10:09:01
0
2
1656

Environment and software

lnmp portal on github

Alibaba Cloud ECS-Ubuntu 16.04.2 LTS

Linux iZ2zecxzfewu856w8sll6dZ 4.4.0-63-generic #84-Ubuntu SMP Wed Feb 1 17:20:32 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Error description and screenshot

I found lnmp of docker-compose on github, but both php and mysql were started. Why can't nignx start?

After executing docker-compose up, it will always be the following section.

Use docker ps to see that php and mysql are running.

巴扎黑
巴扎黑

reply all(2)
小葫芦

The error reported is a mysql error. It is recommended to use docker logs $container_id to view the nginx log, or you can post the compose.yml code when orchestrating the nginx service.

You can also try an environment I compiled: https://github.com/zhaojunlik...

伊谢尔伦

The reason why lnmp startup failed for https://github.com/micooz/doc...

Use docker logs to query the log and see that due to the certificate, the following two files need to be modified.

docker-compose.yml
Comment out the following two paragraphs.

    - ./nginx/ca/server.crt/:/etc/nginx/server.crt:ro
    - ./nginx/ca/server.key/:/etc/nginx/server.key:ro

nginx/conf.d/default.conf
Comment out the following two paragraphs.

    ssl_certificate      /etc/nginx/server.crt;
    ssl_certificate_key  /etc/nginx/server.key;

Restart docker-compose up

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template