สร้าง Certbot container
server {
listen 80;
server_name test.nstru.ac.th;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
}
version: '3'
services:
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
command: certonly --webroot -w /var/www/certbot --force-renewal --email suppachok_sin@nstru.ac.th -d arit-manaul.nstru.ac.th --agree-tos
depends_on:
- nginx