after installing with ansible, change the docker-compose.yml file on you server passing the api in the ENV variable:
the postfix section now looks like this
postfix:
image: mwader/postfix-relay
environment:
- POSTFIX_myhostname=[yourdomain.tld]
- POSTFIX_inet_protocols=ipv4
- POSTFIX_smtp_sasl_auth_enable=yes
- POSTFIX_smtp_sasl_password_maps=static:apikey:[api-key]
- POSTFIX_smtp_tls_security_level=may
- POSTFIX_smtp_sasl_security_options=noanonymous
- POSTFIX_relayhost=smtp.sendgrid.net:587
- OPENDKIM_DOMAINS=[yourdomain.tld]
restart: "always"
seems like I was nearly there :) yes you copy the volumes folder, and change ownership to those folders. But then the db has the password from your previous installation stored, so you need to change that. Copy the password from your docker-compose.yml file, and add it to the database like this:
docker exec -i FOLDERNAME_postgres_1 psql -U lemmy -c "alter user lemmy with password 'bleh'"
(from https://join-lemmy.org/docs/en/administration/backup_and_restore.html)