Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some kind patch, remove api2 , add collectstatic method, use `docker-… #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cropse
Copy link

@cropse cropse commented Nov 25, 2017

#1 使用這指令就可以一次起兩支,不過nginx還是要對應修改,但是這做法至少省掉你一次build兩個image的空間跟時間,有興趣可以fetch下來看看:)
啟動:
docker-compose up -d --scale api=2
關閉:
docker-compose down -v

@cropse
Copy link
Author

cropse commented Nov 25, 2017

主要修改的部分

  1. 靜態檔每次執行就產生一次
  2. 透過compose scale 兩個service
  3. 共用同一個image的寫法,功能一樣的話,不用重複做兩個images
    比較注意的部分,docker-compose 的命名會根據root folder prefix,所以會比較難看一點。

@twtrubiks
Copy link
Owner

twtrubiks commented Nov 26, 2017

謝謝提供思路

可以正常work 這方法真的還不錯~ 感謝指導~

已將範例整理至 better 分支了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants