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

Organise env variables and authorization #60

Merged
merged 8 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ MATCH_DB_LOCAL_URI=mongodb://match-db:27017/match
MATCH_DB_USERNAME=user
MATCH_DB_PASSWORD=password

# Broker
BROKER_URL=amqp://broker:5672

# Secret for creating JWT signature
JWT_SECRET=you-can-replace-this-with-your-own-secret

Expand Down
2 changes: 1 addition & 1 deletion compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
ports:
- 27019:27017

match-broker:
broker:
ports:
- 5672:5672

Expand Down
13 changes: 8 additions & 5 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ services:
DB_LOCAL_URI: ${QUESTION_DB_LOCAL_URI}
DB_USERNAME: ${QUESTION_DB_USERNAME}
DB_PASSWORD: ${QUESTION_DB_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
networks:
- gateway-network
- question-db-network
Expand Down Expand Up @@ -94,8 +95,10 @@ services:
DB_LOCAL_URI: ${MATCH_DB_LOCAL_URI}
DB_USERNAME: ${MATCH_DB_USERNAME}
DB_PASSWORD: ${MATCH_DB_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
BROKER_URL: ${BROKER_URL}
depends_on:
match-broker:
broker:
condition: service_healthy
networks:
- gateway-network
Expand All @@ -114,13 +117,13 @@ services:
- match-db-network
restart: always

match-broker:
container_name: match-broker
hostname: match-broker
broker:
container_name: broker
hostname: broker
image: rabbitmq:4.0.2
user: rabbitmq
networks:
- match-db-network
- gateway-network
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 30s
Expand Down
5 changes: 4 additions & 1 deletion services/match/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ DB_CLOUD_URI=<FILL-THIS-IN>
DB_LOCAL_URI=mongodb://match-db:27017/match
DB_USERNAME=user
DB_PASSWORD=password
PORT=8083
BROKER_URL=amqp://broker:5672
JWT_SECRET=you-can-replace-this-with-your-own-secret
PORT=8083
NODE_ENV=development
Loading