-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add docker-compose #1666
Merged
Merged
Add docker-compose #1666
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
version: "3.6" | ||
services: | ||
# CB-Spider | ||
cb-spider: | ||
image: cloudbaristaorg/cb-spider:0.9.0 | ||
container_name: cb-spider | ||
platform: linux/amd64 | ||
ports: | ||
- target: 1024 | ||
published: 1024 | ||
protocol: tcp | ||
volumes: | ||
# - ./conf/log_conf.yaml:/root/go/src/github.com/cloud-barista/cb-spider/conf/log_conf.yaml | ||
- ./conf/store_conf.yaml:/root/go/src/github.com/cloud-barista/cb-spider/conf/store_conf.yaml | ||
- ./container-volume/cb-spider-container/meta_db/:/root/go/src/github.com/cloud-barista/cb-spider/meta_db/ | ||
- ./container-volume/cb-spider-container/log/:/root/go/src/github.com/cloud-barista/cb-spider/log/ | ||
environment: | ||
- PLUGIN_SW=OFF | ||
- SERVER_ADDRESS=localhost | ||
# if you leave these values empty, REST Auth will be disabled. | ||
# - API_USERNAME= | ||
# - API_PASSWORD= | ||
- SPIDER_LOG_LEVEL=error | ||
- SPIDER_HISCALL_LOG_LEVEL=error | ||
- ID_TRANSFORM_MODE=ON | ||
healthcheck: # for CB-Spider | ||
test: [ "CMD", "curl", "-f", "http://localhost:1024/spider/readyz" ] | ||
interval: 1m | ||
timeout: 5s | ||
retries: 3 | ||
start_period: 10s | ||
# CB-Tumblebug | ||
cb-tumblebug: | ||
image: cloudbaristaorg/cb-tumblebug:0.9.0 | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
container_name: cb-tumblebug | ||
platform: linux/amd64 | ||
ports: | ||
- target: 1323 | ||
published: 1323 | ||
protocol: tcp | ||
depends_on: | ||
- cb-spider | ||
volumes: | ||
- ./conf/:/app/conf/ | ||
- ./container-volume/cb-tumblebug-container/meta_db/:/app/meta_db/ | ||
- ./container-volume/cb-tumblebug-container/log/:/app/log/ | ||
environment: | ||
# - CBTUMBLEBUG_ROOT=/app | ||
# - CBSTORE_ROOT=/app | ||
# - CBLOG_ROOT=/app | ||
# - SPIDER_CALL_METHOD=REST | ||
- SPIDER_REST_URL=http://cb-spider:1024/spider | ||
# - DRAGONFLY_CALL_METHOD=REST | ||
- DRAGONFLY_REST_URL=http://cb-dragonfly:9090/dragonfly | ||
# - DB_URL=localhost:3306 | ||
# - DB_DATABASE=cb_tumblebug | ||
# - DB_USER=cb_tumblebug | ||
# - DB_PASSWORD=cb_tumblebug | ||
# - ALLOW_ORIGINS=* | ||
# - ENABLE_AUTH=true | ||
# - API_USERNAME=default | ||
# - API_PASSWORD=default | ||
# - AUTOCONTROL_DURATION_MS=10000 | ||
- SELF_ENDPOINT=localhost:1323 | ||
# - API_DOC_PATH=/app/src/api/rest/docs/swagger.json | ||
# - DEFAULT_NAMESPACE=ns01 | ||
# - DEFAULT_CREDENTIALHOLDER=admin | ||
# - LOGFILE_PATH=/app/log/tumblebug.log | ||
# - LOGFILE_MAXSIZE=10 | ||
# - LOGFILE_MAXBACKUPS=3 | ||
# - LOGFILE_MAXAGE=30 | ||
# - LOGFILE_COMPRESS=false | ||
# - LOGLEVEL=debug | ||
# - LOGWRITER=both | ||
# - NODE_ENV=development | ||
healthcheck: # for CB-Tumblebug | ||
test: [ "CMD", "curl", "-f", "http://localhost:1323/tumblebug/readyz" ] | ||
interval: 1m | ||
timeout: 5s | ||
retries: 3 | ||
start_period: 10s | ||
|
||
# cb-mapui | ||
cb-mapui: | ||
image: cloudbaristaorg/cb-mapui:0.9.0 | ||
container_name: cb-mapui | ||
ports: | ||
- target: 1324 | ||
published: 1324 | ||
protocol: tcp | ||
# depends_on: | ||
# - cb-tumblebug | ||
healthcheck: # for cb-mapui | ||
test: ["CMD", "nc", "-vz", "localhost", "1324"] | ||
interval: 1m | ||
timeout: 5s | ||
retries: 3 | ||
start_period: 10s |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SP_TAG=0.9.0
SP_TAG=latest
환경변수로 지정할 수 있게하면 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seokho-son 말씀주신 의견에 대해 검토 의견을 말씀드립니다.
docker-compose.yaml은 container를 구동 및 연관 관계를 명시해 놓은 파일이라고 생각합니다.
예를 들어, docker-composel.yaml의 envrionment에는 container 구동에 필요한 환경 변수(Dockerfile에 명시된 환경 변수)를 명시하고 있습니다. 이를 환경 변수로 만들면 재차 환경변수를 뽑는 상황이 되는 것으로 보이고 가독성이 상당히 떨어지는 것 같습니다. (아래 적용 버전을 참고하시면 될 것 같습니다.)
그래서 API_USERNAME, API_PASSWORD, DB_USER, DB_PASSWROD 등과 같이 민감함 정보에 대해서만 .env에서 읽도록만들고, GitHub 상에 오픈되지 않도록 하는 방법이 좋겠습니다.
(docker-compose의 TB environment sample)
(.env sample)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seokho-son
#1661 의 제안 취지에 부합하기 위해서,
이 부분에 대해서는 시간을 가지고 정리하는 편이 좋을 것 같습니다.
그래서, 이번 PR에서는 환경변수 관련 사항을 제외한 부분에 대해서 보완하고, 별도의 사안(PR)으로 환경변수 관련 사항을 다루고자 합니다.
관련하여 검토 및 의견을 부탁드립니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yunkon-kim 넵 동의합니다. 현재도 대부분의 기능을 갖추고 있으니, PR 대략 정리되시면 알려주세요! :)