Skip to content

Commit

Permalink
feat: add .env files
Browse files Browse the repository at this point in the history
  • Loading branch information
Stas Polos committed Jan 12, 2023
1 parent 38b9d06 commit d20249a
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/node_modules

# config files
.env
# .env

# Logs
logs
Expand Down
34 changes: 34 additions & 0 deletions apps/room-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# app settings
PORT=3002

# microservices settings
USER_SERVICE_HOST=user-service
USER_SERVICE_PORT=4001
ROOM_SERVICE_HOST=room-service
ROOM_SERVICE_PORT=4002

# database settings
DB_TYPE=postgres
DB_HOST=postgres
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE=second_database

# typeorm settings
TYPEORM_LOGGING=true
TYPEORM_SYNCHRONIZE=false

# settings jwt token for authentication
JWT_SECRET=strong_secret
# jwt token life in seconds
JWT_EXPIRATION_TIME=36000

# setting for passport
PASSPORT_DEFAULT_STRATEGY=Bearer

# settings for rabbitmq
RABBIT_MQ_URI=amqp://rabbitmq:5672
RABBIT_MQ_ROOMS_QUEUE=room-service
RABBIT_MQ_AUTH_QUEUE=auth
RABBIT_MQ_USERS_QUEUE=user-service
34 changes: 34 additions & 0 deletions apps/user-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# app settings
PORT=3001

# microservices settings
ROOM_SERVICE_HOST=room-service
ROOM_SERVICE_PORT=4002
USER_SERVICE_PORT=4001
USER_SERVICE_HOST=user-service

# database settings
DB_TYPE=postgres
DB_HOST=postgres
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE=first_database

# typeorm settings
TYPEORM_LOGGING=true
TYPEORM_SYNCHRONIZE=false

# settings jwt token for authentication
JWT_SECRET=strong_secret
# jwt token life in seconds
JWT_EXPIRATION_TIME=36000

# setting for passport
PASSPORT_DEFAULT_STRATEGY=Bearer

# settings for rabbitmq
RABBIT_MQ_URI=amqp://rabbitmq:5672
RABBIT_MQ_ROOMS_QUEUE=room-service
RABBIT_MQ_AUTH_QUEUE=auth
RABBIT_MQ_USERS_QUEUE=user-service

0 comments on commit d20249a

Please sign in to comment.