newsdev/assets-deploy

Name: assets-deploy

Owner: NYT Newsroom Developers

Description: Deprecated

Created: 2015-05-27 21:43:02.0

Updated: 2017-05-31 22:46:53.0

Pushed: 2016-11-07 02:19:53.0

Homepage: https://github.com/newsdev/cloud-builders/tree/master/assets-deploy

Size: 27

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

S3 Assets Deploy

A Dockerized script to deploy static assets for an application to S3.

The application static assets should be made available to the script by injecting it as a volume.

Usage
ll the assets deploy image from the image registry.
er pull nytinteractive/assets-deploy:latest

ild an image of the application.
er build --tag=your-application .

n the container so a volume of the public assets can be extracted.
sets must exist in the application's container at `/usr/src/app/public/`
er run --name your-application-assets -v /usr/src/app/public/ your-application echo 'loading assets'

n the assets deploy with the volume from the application.
er run --rm --volumes-from your-application-assets -e AWS_BUCKET={AWS_BUCKET_HERE} -e STORAGE_PATH={STORAGE_PATH_HERE} -e AWS_ACCESS_KEY_ID='{AWS_KEY_ID_HERE}' -e AWS_SECRET_ACCESS_KEY='{AWS_SECRET_ACCESS_KEY_HERE}' nytinteractive/assets-deploy

Note that AWS keys often have special characters that can have unpredictable expansions in bash, so should be enclosed in quotes. Example:

er run -i -t --name assets-deploy --volumes-from scoop-that -e AWS_BUCKET=int.nyt.com -e STORAGE_PATH=docker/scoop-that/assets -e AWS_ACCESS_KEY_ID='<access_id>' -e AWS_SECRET_ACCESS_KEY='<secret_key>' assets-deploy

In this case, scoop-that is the name of your running scoop-that container, and assets-deploy is the name of this image.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.