-
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
Fix #517 Configurable Docker Compose exposed ports #518
Conversation
fix path error for restAPI image
…e exposed ports
…ompose-exposed-ports Fix center-for-threat-informed-defense#517 Configurable Docker Compose exposed ports
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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 unnecessary environment variables from persisting in the container. The rest looks okay.
@@ -3,37 +3,44 @@ services: | |||
frontend: | |||
container_name: attack-workbench-frontend | |||
build: . | |||
environment: | |||
FRONTEND_PORT: "${FRONTEND_PORT:-80}" |
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 includes FRONTEND_PORT
and BACKEND_PORT
. The rest look okay to me (since they are used by the containerized applications).
@ElJocko curious as to your thoughts.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove BACKEND_PORT
.
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}" | ||
DATABASE_PORT: "${DATABASE_PORT:-27017}" |
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 BACKEND_PORT
and DATABASE_PORT
.
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.
nice
This compose file has been superseded by the template available in the newer Workbench Deployment repo. Thank you for your contribution. |
This PR fixes #517 by allowing the use of environment variables in Docker Compose to configure the exposed ports.