katefike / sage

A personal finance app that's like Mint, but better. It uses a dockerized postfix/dovecot email server. Parses transaction data from alert emails.
MIT License
5 stars 0 forks source link

Fix missing TLS certs in mailserver container #107

Closed katefike closed 10 months ago

katefike commented 10 months ago

Problem

docker/certbot/get_certs.sh is supposed to copy the TLS certs into the docker container, but they aren't there:

root@prod:/home/kfike# ls /etc/letsencrypt/live/prod.sagefinancial.dev
README  cert.pem  chain.pem  fullchain.pem  privkey.pem
root@prod:/home/kfike# docker exec -it sage-mailserver bash
root@60bc0adc3408:/# ls /etc/letsencrypt/live/prod.sagefinancial.dev

These are the lines that are supposed to copy the certs:

echo "Copying TLS certs to sage-mailserver Docker container..."
docker cp -L ${certbot_cert} sage-mailserver:${certbot_cert}
docker cp -L ${certbot_key} sage-mailserver:${certbot_key}

Solution

Just ran the lines above separately and the certs copied.