3

I had a website that was built from one repo. Suppose some of the links are:

/index.html
/one/index.html
/two/index.html
/two/one/index.html
/three/index.html

Now the repo has been separated:

  • repoA generates /index.html and /one/index.html.
  • repoB generates /two/index.html, /two/one/index.html and /three/index.html.

Can I make a build process with Docker that merges the output of repoA and repoB in the root of my domain? So as to have www.somedomain.com/, www.somedomain.com/one, www.somedomain.com/two, www.somedomain.com/two/one, www.somedomain.com/three?

Can they be built separately and combined at the root of my domain? Can there be a pipeline that builds both repos and combines them at the root? I prefer to have separate pipelines for both and combine them, but any solution will do.


More details:

The build process for repoA generates

/index.html
/one/index.html

and a set of assets

bbbb-4564654.js
some-image-asdfsadfsadf.svg
whatever-asdfsdf.ttf

The build process for repoB generates the following

two/index.html
two/one/index.html
three/index.html

and another set of assets.

Asset names are different on both build processes

The end result is I want these files combined at the root of my domain.


Edit: Furthermore if docker is not the right tool for , please I can take recommendations for other options

user3808307
  • 2,270
  • 9
  • 45
  • 99
  • Can you clarify what you mean by "a build process that merges, so to speak"? What is being built? Are these static HTML files? What does this have to do with Docker? What do you mean by "pipeline"? – chash Jul 09 '20 at 23:24
  • @hmm the build process for repoA generates and index.html, and a folder called one, with and index.html file inside and their respective assets (fonts js images, etc). The build process for repoB generates a folder called two with an index.html file inside, and a folder called one inside with it's own index.html file, and a folder called three with an index.html file, and their respective assets. Assets names do not overlap and are different for both projects. I would like all the resulting files to end up in my root domain. Let me know if it is clear. I will add it in the question – user3808307 Jul 09 '20 at 23:27
  • So you just need to merge two directory trees that have non-overlapping files? – chash Jul 09 '20 at 23:29
  • @hmm yes, that is it – user3808307 Jul 09 '20 at 23:33
  • I found these related answers https://stackoverflow.com/questions/47461999/docker-compose-merge-combine-two-containers/47462089#47462089 https://stackoverflow.com/questions/39711924/merge-two-docker-images/39713151#39713151 https://stackoverflow.com/questions/43729973/how-to-use-multiple-base-images-to-build-a-docker-image/47155164#47155164 – user3808307 Jul 22 '20 at 18:23

0 Answers0