diff --git a/compose.yaml b/compose.yaml index e40a5eb..2afbdcf 100644 --- a/compose.yaml +++ b/compose.yaml @@ -33,6 +33,46 @@ services: restart: unless-stopped shm_size: 4mb + competition: + build: + context: . + dockerfile: Containerfile + depends_on: + postgres: + restart: false + condition: service_healthy + required: true + redis: + restart: false + condition: service_healthy + required: true + auth: + restart: false + condition: service_started + required: true + env_file: + - path: ./infrastructure/competition/.env.template + required: true + - path: ./infrastructure/competition/.env + required: false + ports: + - name: http + target: 8082 + published: 13445 + host_ip: 127.0.0.1 + protocol: tcp + app_protocol: http + - name: grpc + target: 50053 + published: 13446 + host_ip: 127.0.0.1 + protocol: tcp + app_protocol: http + networks: + - default + restart: unless-stopped + shm_size: 4mb + core: build: context: . @@ -54,6 +94,10 @@ services: restart: false condition: service_started required: true + competition: + restart: false + condition: service_started + required: true env_file: - path: ./infrastructure/core/.env.template required: true diff --git a/infrastructure/competition/.env.template b/infrastructure/competition/.env.template new file mode 100644 index 0000000..2526129 --- /dev/null +++ b/infrastructure/competition/.env.template @@ -0,0 +1,31 @@ +# Competition Service Configuration + +# gRPC server port +COMPETITION_GRPC_PORT=50053 + +# Enable/disable gRPC reflection +COMPETITION_GRPC_ENABLE_REFLECTION=true + +# HTTP server port (if applicable) +COMPETITION_HTTP_PORT=8082 + +# Log level (e.g., debug, info, warn, error) +LOG_LEVEL=info + +# PostgreSQL database connection +POSTGRES_HOST=postgres +POSTGRES_PORT=5432 +POSTGRES_USERNAME=postgres +POSTGRES_PASSWORD=postgres +POSTGRES_DATABASE=postgres + +# Address of the authentication gRPC service +AUTH_SVC_ADDR=auth:50052 + +# Redis connection for caching +REDIS_ADDR=redis:6379 +REDIS_PASSWORD= +REDIS_DB=0 + +# Enable/disable caching +CACHE_ENABLED=true \ No newline at end of file