Skip to main content

store templates on S3

Project description

Installation

$ [sudo] pip install templates-s3
$ [sudo] npm i -g templates-s3

Pros

  • store templates on S3 - no need rebuild docker image

How it works

templates/ hard-coded folder

scripts:

  • create full-access/read-only user and credentials
  • upload/download templates/

hard-coded environment variables names:

  • AWS_S3_TEMPLATES_BUCKET
  • AWS_S3_TEMPLATES_USER
  • AWS_S3_TEMPLATES_ACCESS_KEY_ID
  • AWS_S3_TEMPLATES_SECRET_ACCESS_KEY

Examples

Makefile, create env

TEMPLATES_BUCKET:=BUCKET_NAME
all:
    test -s .env.s3.templates || templates-s3-create-full-access-env $(TEMPLATES_BUCKET) > .env.s3.templates
    test -s .env.prod.templates || templates-s3-create-read-only-env $(TEMPLATES_BUCKET) > .env.prod.templates

upload templates/ to S3

set -o allexport
. .env.s3.templates || exit

templates-s3-upload

Dockerfile

ENTRYPOINT ["/bin/sh","/entrypoint.sh"]

entrypoint.sh

templates-s3-download
...

ansible-playbook.yml

...
  tasks:
  - name: task_name
    docker_container:
      ...
      env_file: ".env.prod"

readme42.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

templates-s3-2020.12.3.tar.gz (3.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page