Code Monkey home page Code Monkey logo

Comments (7)

Lissy93 avatar Lissy93 commented on June 1, 2024 1

I believe this should be possible by modifying the build command, to include the --no-clean flag [docs]

dashy/Dockerfile

Lines 24 to 25 in eea193a

# Build initial app for production
RUN yarn build --mode production

- RUN yarn build --mode production
+ RUN yarn build --mode production --no-clean

I'll test that out this evening, and see if I can get a PR for you :)

from dashy.

jecnua avatar jecnua commented on June 1, 2024

Hi @Lissy93 , thank you for the quick reply and taking this on.
I saw the commit, but please correct me if I am wrong (I know nothing of nodejs/yarn/etc), but isn't the issue that docker command is:

build-and-start

Thank build-and-start calls build:

https://github.com/Lissy93/dashy/blob/master/package.json#L14

and that build is missing the flag --no-clean?

https://github.com/Lissy93/dashy/blob/master/package.json#L10

Even if you change the dockerfile the build call above will (try to) remove the directory at runtime?

from dashy.

jecnua avatar jecnua commented on June 1, 2024

Basically I tried this change locally (adding a couple of yarn scripts in the package.json):

https://github.com/Lissy93/dashy/compare/master...jecnua:dashy:1570-add-build-no-clean-option?expand=1

And if they are there, in k8s I can override the command and call the no-clean option:

command:
  - yarn
  - build-no-clean-and-start

I am not doing the PR because I understand the change is horrible, and I don't expect to pollute the repo with every single user usecase ^^ But maybe the example can help finding a cleaner solution to allow the no-clean option?

from dashy.

Lissy93 avatar Lissy93 commented on June 1, 2024

Ah yes, you're right, it should go in the run stage, and not the build stage - so the package.json under build-and-start command would work

from dashy.

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.