1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00

Updates permissions

This commit is contained in:
Eldad Fux 2020-02-24 18:47:45 +02:00
parent 26b6c12f80
commit 81ba228810
2 changed files with 22 additions and 1 deletions

View file

@ -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

View file

@ -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' => [