Giter VIP home page Giter VIP logo

Comments (5)

bjaglin avatar bjaglin commented on June 12, 2024 1

Hi @github-daniel-stoian 😉

There is no built-in mechanism, and AFAIK, you are stuck on the 2.x branch which is effectively EOL. You can probably start from https://github.com/michaelsauter/crane-templates/blob/master/docker-compose.tmpl if you want to derive a docker-compose v3 config.

from crane.

github-daniel-stoian avatar github-daniel-stoian commented on June 12, 2024

Thank you Brice.

from crane.

github-daniel-stoian avatar github-daniel-stoian commented on June 12, 2024

Hello again,

I've give it a try with crane generate command using https://github.com/michaelsauter/crane-templates/blob/master/docker-compose.tmpl and it's working.

Unfortunately we need to generate more custom templates inquiring elaborated operations:

  • skipping certain services if name it's not matching a pattern
  • edit ports/labels/environment
  • etc

For that we need more functions added into template function like :

  • strings.Contains
  • strings.Split
  • etc

Something like Funcs:
var (
funcs = template.FuncMap{"contains": strings.Contains, "split": strings.Split}
)
tmpl, err := template.New(templateName).Funcs(funcs).ParseFiles(templateFile)

On top of that, we need this function on v2.11.1 ... because we are stuck on that version.
What will be a course of actions for this change for older version ?

Thank you.

from crane.

michaelsauter avatar michaelsauter commented on June 12, 2024

@github-daniel-stoian I suggest you fork this repo and make the changes you require to v2 in your repo.

from crane.

github-daniel-stoian avatar github-daniel-stoian commented on June 12, 2024

I was thinking the same thing. Thank you.

from crane.

Related Issues (20)

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.