Laradock + mkcert

di folder laradock/certbot/letsencrypt

sudo mkcert -installsudo mkcert dev.jepara.com

edit docker-compose.yml

nginx:build:context: ./nginxargs:- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}- CHANGE_SOURCE=${CHANGE_SOURCE}- http_proxy- https_proxy- no_proxyvolumes:- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}- ${NGINX_HOST_LOG_PATH}:/var/log/nginx- ${NGINX_SITES_PATH}:/etc/nginx/sites-available- ${NGINX_SSL_PATH}:/etc/nginx/ssl- ./data/certbot/certs/:/var/certs- ./certbot/letsencrypt/:/var/www/letsencrypt

edit jepara.conf at nginx/sites

# For https
    listen 443 ssl;
    #listen [::]:443 ssl ipv6only=on;
    ssl_certificate /var/www/letsencrypt/dev.jepara.com.pem;
    ssl_certificate_key /var/www/letsencrypt/dev.jepara.com-key.pem;

setelah itu bisa restart container nginx

docker-compose restart nginx

docker-compose build nginx












Leave a Reply

Your email address will not be published. Required fields are marked *