fix
This commit is contained in:
		@@ -7,8 +7,8 @@ services:
 | 
			
		||||
    networks:
 | 
			
		||||
      - queues-development
 | 
			
		||||
      - monitoring
 | 
			
		||||
      - mongo-development
 | 
			
		||||
    environment:
 | 
			
		||||
      MONGO_HOST: "mongo.develop.sprinthub.ru"
 | 
			
		||||
      MONGO_PASSWORD: $MONGO_PASSWORD_DEV
 | 
			
		||||
      STAGE: "development"
 | 
			
		||||
    deploy:
 | 
			
		||||
@@ -26,3 +26,5 @@ networks:
 | 
			
		||||
    external: true
 | 
			
		||||
  monitoring:
 | 
			
		||||
    external: true
 | 
			
		||||
  mongo-development:
 | 
			
		||||
    external: true
 | 
			
		||||
 
 | 
			
		||||
@@ -7,6 +7,7 @@ services:
 | 
			
		||||
    networks:
 | 
			
		||||
      - queues
 | 
			
		||||
      - monitoring
 | 
			
		||||
      - mongo
 | 
			
		||||
    environment:
 | 
			
		||||
      MONGO_HOST: "mongo.sprinthub.ru"
 | 
			
		||||
      MONGO_PASSWORD: $MONGO_PASSWORD_PROD
 | 
			
		||||
@@ -26,3 +27,5 @@ networks:
 | 
			
		||||
    external: true
 | 
			
		||||
  monitoring:
 | 
			
		||||
    external: true
 | 
			
		||||
  mongo:
 | 
			
		||||
    external: true
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@ import (
 | 
			
		||||
var Database mongo.Database
 | 
			
		||||
 | 
			
		||||
func Connect() {
 | 
			
		||||
	connectionString := fmt.Sprintf("mongodb://mongo:%s@%s:27017/", utils.GetEnv("MONGO_PASSWORD", "password"), utils.GetEnv("MONGO_HOST", "localhost"))
 | 
			
		||||
	connectionString := fmt.Sprintf("mongodb://mongo:%s@mongo:27017/", utils.GetEnv("MONGO_PASSWORD", "password"))
 | 
			
		||||
	client, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(connectionString))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		panic(err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user