Skip to content

Commit

Permalink
compose: Add networks
Browse files Browse the repository at this point in the history
Set up network drivers to apply Principle of Least Privilege
  • Loading branch information
samuelim01 committed Sep 13, 2024
1 parent 3ec6a5d commit 9e2e78e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ services:
volumes:
- /app/node_modules
- ./frontend:/app
networks:
- question-network

question:
container_name: question
Expand All @@ -25,6 +27,9 @@ services:
volumes:
- /app/node_modules
- ./services/question:/app
networks:
- question-network
- question-db-network

question-db:
container_name: question-db
Expand All @@ -34,6 +39,14 @@ services:
MONGO_INITDB_ROOT_PASSWORD: ${QUESTION_DB_PASSWORD}
volumes:
- question-db:/data/db

networks:
- question-db-network

volumes:
question-db:
question-db:

networks:
question-network:
driver: bridge
question-db-network:
driver: bridge

0 comments on commit 9e2e78e

Please sign in to comment.