Coder Social home page Coder Social logo

pencil's Introduction

Hi there 👋

Metrics

pencil's People

Contributors

chris-greaves avatar

Stargazers

 avatar

Watchers

 avatar

pencil's Issues

Support Docker on ARM

Issue

The package "ghcr.io/chris-greaves/pencil" does not support the arm64 platform.

Possible Solution

Specify platform when building and pushing docker image. See here

Catches

  • Another platform to test on, but it's 100% worth it!

Support for Azure KeyVault Secrets

The Issue

For some more enterprise users, they might want to pull secrets from their existing Azure KeyVault. This would enable automated deployments to pull in large amounts of secrets and variables without having to build out an .env file or pass them all in to docker-compose.

Possible Solution

pencil --azure-kv <connection_string_with_key> ./config.yaml and then {{ azure "KVSecret" }} or {{ .Azure.KVSecret }}

This change would enable users to change deployments like:

DATABASE_URL=<value> DATABASE_DB=<value> DATABASE_USER=<value> DATABASE_PASS=<value> DATABASE_SECRET_KEY=<value> docker compose up -d

to

AZURECONNSTR=<value> docker compose up -d

Catches

  • Pencil will now rely on a third party lib (not really that big of a catch)
  • If we do Azure KV, we'll also need to do alternatives like AWS Secrets Manager, HashiCorp Vault, Google Cloud Secret Manager, etc.

Variable parsing breaks when value contains '='

When setting a variable containing a = in the value, it isn't parsed correctly and therefore brakes configs.

Example below:

  pencil:
    image: ghcr.io/chris-greaves/pencil:v0.0.1
    environment:
      - AZURE_STORAGE_ACCOUNT="devstoreaccount1" # Default Azurite storage account
      - AZURE_STORAGE_KEY="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" # Default azurite storage key
    command:
      - "/mnt/configs/"
    volumes:
      - ./tempo/tempo.yml:/mnt/configs/tempo.yml
      - ./loki/loki.yml:/mnt/configs/loki.yml

Support re-runnable templates

The issue

Currently, the files are replaced in-place, meaning once it's run you can't revert to your template again.
This isn't an issue if you only plan on running the template once, but if you might want to change the values in the future, then the user needs to copy the template back in.

Possible Solution

If we handled files with the extension .gotmpl as templates and created the file next to it without that extension, then it would be rerunnable. Example below

Before:

app/
    config.yml.gotmpl

After:

app/
    config.yml
    config.yml.gotmpl

Catches

  • Use in docker compose might get a little confusing when setting up the volumes. For example, you now need to mount a folder not just one file, otherwise the created file won't be copied back to the host.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.