yongjhih / docker-parse-server

Provide docker images and docker stack for parse-server npm versions and latest commit
https://hub.docker.com/r/yongjhih/parse-server/
Apache License 2.0
475 stars 166 forks source link

Why it's always build when restart? #37

Closed katopz closed 8 years ago

katopz commented 8 years ago

Is it expected behavior?

> parse-dashboard@1.0.6 dashboard /src
> node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch
The dashboard is now available at http://localhost:4040/
0% compile 10% 0/1 build modules 70% 1/1 build modules 40% 1/2 build modules 30% 1/3 build modules 25% 1/4 build modules 22% 1/5 build modules 34% 2/5
...
Hash: d57a02225cd5793ce3c6
Version: webpack 1.12.15
Time: 40621ms
                                   Asset     Size  Chunks             Chunk Names
img/cf0a48bbd61302f119a4576be8e01ed9.png   652 kB          [emitted]  
                     dashboard.bundle.js  3.56 MB       0  [emitted]  dashboard
                             sprites.svg  99.3 kB          [emitted] 

Refer to webpack --config webpack/build.config.js --progress --watch And after start localhost I need to wait 40621ms for the build every time I restart even nothing changed. It's look like config for development for me, Is there any config for production environment there?

Thanks

yongjhih commented 8 years ago

Try to use docker-compose stop instead of docker-compose down.

katopz commented 8 years ago

I did try docker-compose stop but it still happen when docker-compose up -d and docker-compose restart after that.

yongjhih commented 8 years ago

I created a docker-compose-production.yml for parse-dashboard production for you:

PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1 USER1=user1 USER1_PASSWORD=user1 MASTER_KEY=myMasterKey APP_ID=myAppId docker-compose -f docker-compose-production.yml up

ref. https://github.com/yongjhih/docker-parse-server/commit/dc42e684d6b08933b36b9917a1531ba722507464

katopz commented 8 years ago

Cool! I'll try

katopz commented 8 years ago

Refer to https://docs.docker.com/compose/production/

This configuration file only needs to include the changes you’d like to make from the original Compose file.

I think it should contain only different between dev and prod there not just copy & paste. We should do something like this https://docs.docker.com/compose/extends/#different-environments

No rush on this btw, You can leave this to me. I'll made a PR when I'm done with it. :)

Cheers