Updates permissions
This commit is contained in:
parent
26b6c12f80
commit
81ba228810
|
@ -129,6 +129,9 @@ COPY ./docker/supervisord.conf /etc/supervisord.conf
|
|||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod 775 /entrypoint.sh
|
||||
|
||||
# Letsencrypt Permissions
|
||||
RUN chmod 755 /etc/letsencrypt/live/
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
|
|
@ -94,10 +94,28 @@ class CertificatesV1
|
|||
throw new Exception('Failed to issue a certificate');
|
||||
}
|
||||
|
||||
if(!rename('/etc/letsencrypt/live/'.$domain->get(), APP_STORAGE_CERTIFICATES.'/'.$domain->get())) {
|
||||
if(!@rename('/etc/letsencrypt/live/'.$domain->get(), APP_STORAGE_CERTIFICATES.'/'.$domain->get())) {
|
||||
throw new Exception('Failed to copy certificate: '.json_encode($response));
|
||||
}
|
||||
|
||||
// // ls cert.pem chain.pem fullchain.pem privkey.pem
|
||||
|
||||
// if(!@rename('/etc/letsencrypt/live/test.appwrite.org/cert.pem', APP_STORAGE_CERTIFICATES.'/cert.pem')) {
|
||||
// throw new Exception('Failed to copy certificate cert.pem');
|
||||
// }
|
||||
|
||||
// if(!@rename('/etc/letsencrypt/live/test.appwrite.org/chain.pem', APP_STORAGE_CERTIFICATES.'/chain.pem')) {
|
||||
// throw new Exception('Failed to copy certificate chain.pem');
|
||||
// }
|
||||
|
||||
// if(!@rename('/etc/letsencrypt/live/test.appwrite.org/fullchain.pem', APP_STORAGE_CERTIFICATES.'/fullchain.pem')) {
|
||||
// throw new Exception('Failed to copy certificate fullchain.pem');
|
||||
// }
|
||||
|
||||
// if(!@rename('/etc/letsencrypt/live/test.appwrite.org/privkey.pem', APP_STORAGE_CERTIFICATES.'/privkey.pem')) {
|
||||
// throw new Exception('Failed to copy certificate privkey.pem');
|
||||
// }
|
||||
|
||||
$certificate = array_merge($certificate, [
|
||||
'$collection' => Database::SYSTEM_COLLECTION_CERTIFICATES,
|
||||
'$permissions' => [
|
||||
|
|
Loading…
Reference in a new issue