mirror of
				https://github.com/3ybactuk/marketplace-go-service-project.git
				synced 2025-10-30 05:53:45 +03:00 
			
		
		
		
	[hw-4] add postgres db
This commit is contained in:
		| @@ -17,7 +17,43 @@ services: | ||||
|     build:  | ||||
|       context: . | ||||
|       dockerfile: loms/Dockerfile | ||||
|     depends_on: | ||||
|       - postgres-master | ||||
|     ports: | ||||
|       - "8083:8083" | ||||
|       - "8084:8084" | ||||
|       - "8085:8085" | ||||
|  | ||||
|   postgres-master: | ||||
|     image: gitlab-registry.ozon.dev/go/classroom-18/students/base/postgres:16 | ||||
|     container_name: postgres-master | ||||
|     environment: | ||||
|       - POSTGRESQL_USERNAME=user | ||||
|       - POSTGRESQL_PASSWORD=password | ||||
|       - POSTGRESQL_DATABASE=route256 | ||||
|       - POSTGRESQL_REPLICATION_MODE=master | ||||
|       - POSTGRESQL_REPLICATION_USER=repl_user | ||||
|       - POSTGRESQL_REPLICATION_PASSWORD=repl_password | ||||
|       - POSTGRESQL_SYNCHRONOUS_COMMIT_MODE=on | ||||
|       - POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS=1 | ||||
|     ports: | ||||
|       - "5433:5432" | ||||
|  | ||||
|   postgres-replica: | ||||
|     image: gitlab-registry.ozon.dev/go/classroom-18/students/base/postgres:16 | ||||
|     container_name: postgres-replica | ||||
|     depends_on: | ||||
|       - postgres-master | ||||
|     environment: | ||||
|       - POSTGRESQL_DATABASE=route256 | ||||
|       - POSTGRESQL_USERNAME=user | ||||
|       - POSTGRESQL_PASSWORD=password | ||||
|       - POSTGRESQL_REPLICATION_MODE=slave | ||||
|       - POSTGRESQL_REPLICATION_USER=repl_user | ||||
|       - POSTGRESQL_REPLICATION_PASSWORD=repl_password | ||||
|       - POSTGRESQL_MASTER_HOST=postgres-master | ||||
|       - POSTGRESQL_MASTER_PORT_NUMBER=5432 | ||||
|       - POSTGRESQL_SYNCHRONOUS_COMMIT_MODE=on | ||||
|       - POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS=1 | ||||
|     ports: | ||||
|       - "5434:5432" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Никита Шубин
					Никита Шубин