-
Notifications
You must be signed in to change notification settings - Fork 60
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
Fix #517 Configurable Docker Compose exposed ports #518
Closed
MaurizioCasciano
wants to merge
8
commits into
center-for-threat-informed-defense:develop
from
ATTACK-Universe:master
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9bc1d00
Update docker-compose.md (#501)
mticmtic 17f0be2
Merge branch 'develop'
clemiller d4b0db2
Update changelog.md
clemiller 1162b9d
Merge branch 'develop'
clemiller 4cd460d
Fix #517 Configurable Docker Compose exposed ports
MaurizioCasciano 8aa3429
Add rest-api DATABASE_PORT: "${DATABASE_PORT:-27017}"
MaurizioCasciano 5720277
Merge pull request #1 from ATTACK-Workbench/517-Configurable-Docker-C…
MaurizioCasciano c4b62b0
Merge branch 'develop' into master
MaurizioCasciano 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,37 +3,44 @@ services: | |
frontend: | ||
container_name: attack-workbench-frontend | ||
build: . | ||
environment: | ||
FRONTEND_PORT: "${FRONTEND_PORT:-80}" | ||
depends_on: | ||
- rest-api | ||
ports: | ||
- "80:80" | ||
- "${FRONTEND_PORT:-80}:80" | ||
volumes: | ||
- ./docker-compose-resources/nginx/nginx.conf:/etc/nginx/nginx.conf:ro | ||
|
||
rest-api: | ||
container_name: attack-workbench-rest-api | ||
build: ../attack-workbench-rest-api | ||
environment: | ||
BACKEND_PORT: "${BACKEND_PORT:-3000}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove |
||
DATABASE_PORT: "${DATABASE_PORT:-27017}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove |
||
DATABASE_URL: "mongodb://attack-workbench-database:${DATABASE_PORT:-27017}/attack-workspace" | ||
SERVICE_ACCOUNT_APIKEY_ENABLE: "true" | ||
JSON_CONFIG_PATH: "./resources/rest-api-service-config.json" | ||
WORKBENCH_HOST: "http://attack-workbench-rest-api" | ||
WORKBENCH_AUTHN_SERVICE_NAME: "collection-manager" | ||
WORKBENCH_AUTHN_APIKEY: "sample-key" | ||
depends_on: | ||
- mongodb | ||
ports: | ||
- "3000:3000" | ||
- "${BACKEND_PORT:-3000}:3000" | ||
volumes: | ||
- ./docker-compose-resources/rest-api/rest-api-service-config.json:/usr/src/app/resources/rest-api-service-config.json:ro | ||
environment: | ||
- DATABASE_URL=mongodb://attack-workbench-database/attack-workspace | ||
- SERVICE_ACCOUNT_APIKEY_ENABLE=true | ||
- JSON_CONFIG_PATH=./resources/rest-api-service-config.json | ||
- WORKBENCH_HOST=http://attack-workbench-rest-api | ||
- WORKBENCH_AUTHN_SERVICE_NAME=collection-manager | ||
- WORKBENCH_AUTHN_APIKEY=sample-key | ||
|
||
mongodb: | ||
container_name: attack-workbench-database | ||
image: mongo | ||
environment: | ||
DATABASE_PORT: "${DATABASE_PORT:-27017}" | ||
ports: | ||
- "${DATABASE_PORT:-27017}:${DATABASE_PORT:-27017}" | ||
volumes: | ||
- db-data:/data/db | ||
ports: | ||
- "27017:27017" | ||
|
||
command: "mongod --port ${DATABASE_PORT:-27017}" | ||
|
||
volumes: | ||
db-data: |
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.
Please remove all instances of setting host-centric environment variables from the
environment
property blocks. I believe this just includesFRONTEND_PORT
andBACKEND_PORT
. The rest look okay to me (since they are used by the containerized applications).@ElJocko curious as to your thoughts.