dunglas / frankenphp

🧟 The modern PHP app server
https://frankenphp.dev
MIT License
6.8k stars 233 forks source link

on every deploy FrankenPHP renews the SSL certificate causing block from LE authority server #927

Closed arlanram closed 1 month ago

arlanram commented 3 months ago

What happened?

when updating docker image containing Laravel using Octane with FrankenPHP it obtains a new certificate, after some attempts LE blocks from renewing and https is no longer available

how to deploy a new version of Laravel application with FrankenPHP without obtaining a new certificate?

please help!

Build Type

Docker (Alpine)

Worker Mode

Yes

Operating System

GNU/Linux

CPU Architecture

x86_64

PHP configuration

default of php.ini.production of dunglas/frankenphp:1.2.2-php8.3.9-alpine

and custom.ini

[PHP]
expose_php=0
memory_limit=-1
post_max_size=10M
upload_max_filesize=10M
max_execution_time=0
error_reporting=E_ALL

[Opcache]
opcache.enable=1
opcache.dups_fix=1
opcache.enable_cli=1
opcache.save_comments=1
opcache.validate_timestamps=0
opcache.memory_consumption=512
opcache.file_update_protection=0
opcache.interned_strings_buffer=64
opcache.max_accelerated_files=32531

Relevant log output

LE tells that max certificates amount is reached try after 168 hours and so on...
arlanram commented 3 months ago

@dunglas please look and help

dunglas commented 3 months ago

Hi, I'm on vacation but my company provides paid support if it's urgent. You can contact us at contact@les-tilleuls.coop

AnthonyDG commented 2 months ago

Hi, It's not exactly your question (I had the same), but you could find a workaround here : https://letsencrypt.org/docs/duplicate-certificate-limit/#workaround

kido1611 commented 2 months ago

I think you need to create docker volumes on /data and /config directories

withinboredom commented 2 months ago

There are also storage plugins that can use s3 or other things to keep the certificate backed up and load it on a fresh start.

you need to create docker volumes on /data and /config directories

This works in a pinch, but note that caddy will lock the files if you have more than one instance running. From experience, this will result in deadlock sometimes, preventing servers from coming online.

sneycampos commented 2 months ago

You can find some modules to store the certificates in the cloud or in local volumes. In this Caddy Wiki @mholt created this post explaining how to load balancing caddy

arlanram commented 1 month ago

FrankenPHP is not well documented

searched a lot from all sources to configure properly production environment, Caddy always getting a problem with SSL issues and f8p as well

i will open a PR to resolve this misunderstandings!