Skip to content

Deployment

mbinyam edited this page Jun 19, 2019 · 4 revisions

Deployment

b-ber projects can be deployed to remote hosts using the deploy command. Deploying the project will upload all the compiled output formats (EPUB, Mobi, Reader, etc.) and allow the public to view the Reader and Web builds, as well as download the EPUB, Mobi, and PDFs of the project.

To deploy a project, you'll need a server and access to the server via the console. The deploy command currently only supports uploading to Amazon S3.

The steps below assume that you're using Amazon S3 to host b-ber projects, that you have already created a bucket for your b-ber project, and that the permissions of that bucket allow for web hosting.

  1. Update the config.yml with the Amazon S3 bucket information. See the documentation in Configuring the build for more information about each of the properties.
# config.yml

base_path: /my-project/project-reader/
reader_url: http://my-bucket.s3-website-us-east-1.amazonaws.com/my-project/project-reader
remote_url: http://my-bucket.s3-website-us-east-1.amazonaws.com/my-project
bucket_url: s3://my-bucket/my-project
  1. Ensure the proper environment variables are available in the shell:
    • AWS_ACCESS_KEY_ID; This can be found in the security credentials sub-menu of the AWS console.
    • AWS_SECRET_ACCESS_KEY; This can be found in the security credentials sub-menu of the AWS console.
    • BBER_BUCKET_REGION; The region of your bucket.

Tip: Add the environment variables to a shell script that you can source outside of your b-ber project directory to avoid having to duplicate the information for each project.

  1. Deploy:
$ bber deploy
Clone this wiki locally