--- version: "3.8" services: app: secrets: - smtp_password environment: - "SMTP_PASSWORD_FILE=/run/secrets/smtp_password" - "SMTP_FROM" - "SMTP_USERNAME" - "SMTP_HOST" - "SMTP_PORT" - "SMTP_SECURITY" secrets: smtp_password: external: true name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}