Professional Documents
Culture Documents
LAB
Docker, Crontab, SSL
• In this file, we will add a server block with directives for our server name
and document root, and location blocks to direct the Certbot client’s
request for certificates, PHP processing, and static asset requests.
4. Defining Environment Variables
- In your main project directory, ~/wordpress, open a file called
.env and configure as the photo
• Next, below your db service definition, add the definition for your
wordpress application service:
• below the wordpress application service definition, add the
following definition for your webserver Nginx service:
8. Renewing Certificates
- First create anhd configure bash file ssl_renew.sh
- Add execute permission for it
• root@vmwarelab:~/wordpress# chmod +x ssl_renew.sh
- Next, open your root crontab file to run the renewal script at a
specified interval: (at 00:00 on 31st of every month )
9. Reference
https://www.digitalocean.com/community/tutorials/how-to-install-
wordpress-with-docker-compose