DefangLabs / DefangLabs/defang

Generate with multiple samples (mixin)

Open
#398 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

spike
Dominant language
Go
Stars
166
Forks
24
Avg merge
10h 8m
Merged PRs (30d)
33

Description

I think it would be really cool if we could merge multiple samples. I think one of the barriers during the hackathon was that there's a nextjs sample and a flask sample, but they aren't tied together. So if you want a Next.js frontend and a Flask backend you need to understand compose files and Dockerfiles so you can pick what's necessary from each.

I think that's fine for the more experienced devs that we're going to offer Defang to in the future. But for more junior devs, that might be a bit to much to ask of them.

I think if we carefully structure our samples to match a particular format, we can probably make it relatively easy to merge multiple samples together. It might just be about making sure that the samples have:

  • compose files in the root
  • either a single compose.yaml file or a compose.yaml and a compose.dev.yaml file
  • any services in subdirectories that match the service name in the compose files

I think that as long as those two things are true, we can relatively easily merge the configurations. There might be some stuff to figure out around naming services in compose.dev.yaml files...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing Next.js and Flask samples, including their root compose files and service subdirectories. Compare how compose.yaml and compose.dev.yaml are structured, then determine the merge behavior and service-naming rules needed to combine samples. Done means compatible samples can be merged without requiring users to manually understand Compose files or Dockerfiles.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, dockerfile, flask, next.js
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.