1
0
mirror of https://github.com/ebosas/microservices.git synced 2025-08-24 20:08:55 +02:00

updated .env

This commit is contained in:
ebosas
2021-06-01 15:00:59 +03:00
parent fd669b6d97
commit 2f591c7612
2 changed files with 10 additions and 9 deletions

17
.env
View File

@@ -1,17 +1,18 @@
# TODO: add a warning to keep secure, add to .gitignore
# Configuration via environment variables
# Add this file to .gitignore when using secret data
# Address strings
SERVER_ADDR = 0.0.0.0:8080
POSTGRES_URL = postgres://postgres:mypsw@postgres:5432/microservices
# Docker Compose environment
POSTGRES_PASSWORD = demopsw
# Connection strings
POSTGRES_URL = postgres://postgres:demopsw@postgres:5432/microservices
RABBIT_URL = amqp://guest:guest@rabbitmq:5672
SERVER_ADDR = 0.0.0.0:8080
# RabbitMQ names
# RabbitMQ variables
EXCHANGE = main_exchange
QUEUE_BACK = backend_queue
QUEUE_DB = db_queue
KEY_FRONT = frontend_key
KEY_BACK = backend_key
KEY_DB = db_key
# Docker Compose environment
POSTGRES_PASSWORD = mypsw

View File

@@ -17,7 +17,7 @@ type Config struct {
func New() *Config {
return &Config{
ServerAddr: getEnv("SERVER_ADDR", "localhost:8080"),
PostgresURL: getEnv("POSTGRES_URL", "postgres://postgres:mypsw@localhost:5432/microservices"),
PostgresURL: getEnv("POSTGRES_URL", "postgres://postgres:demopsw@localhost:5432/microservices"),
RabbitURL: getEnv("RABBIT_URL", "amqp://guest:guest@localhost:5672"),
Exchange: getEnv("EXCHANGE", "main_exchange"),
QueueBack: getEnv("QUEUE_BACK", "backend_queue"),