Current section

Files

Jump to
mix_deploy priv templates sync-assets-s3.eex
Raw

priv/templates/sync-assets-s3.eex

#!/bin/sh
# Sync app static assets to S3 bucket for CDN
set -e
# Env vars
# ASSETS_S3_BUCKET: bucket name
# aws configure set default.region ${AWS_DEFAULT_REGION}
# aws s3 cp priv/static s3://${ASSETS_BUCKET} --recursive
aws s3 sync --no-progress priv/static s3://${ASSETS_S3_BUCKET}