Complete serverless deployment for wwwsqldesigner
, including a custom backend to save models on S3 using lambda functions.
STORAGE_S3_BUCKET
: the bucket in which to store the database designs. Must already exist.STORAGE_S3_PREFIX
: the prefix to use when loading and saving database designs.STATICS_S3_BUCKET
: the bucket in which to read thewwwsqldesigner
static files. Must already exist.CF_DOMAIN
: a custom domain name to use on the CloudFront distribution.CF_CERT_ARN
: the ARN of an ACM certificate to use for the custom domain.
The backend is secured using browser-based basic authentication. To manage users,
create a file named users.json
on the root directory. The expected format is:
{
"user1": "sha256 hash of the password",
"user2": "sha256 hash of the password"
}
After creating or updating the user list, perform a new deploy (using npx serverless deploy -f auth
).
Make sure the required environment variables are set, then:
npx serverless deploy
aws s3 sync static/ s3://$STATICS_S3_BUCKET/ --exclude '.git/*'
- Add authorization.
MIT