瀏覽代碼

DevOps

- add submodule: auth
- makefile
- fix ports
Alexey Kim 1 年之前
父節點
當前提交
1bc6366733
共有 6 個文件被更改,包括 36 次插入3 次删除
  1. 3 0
      .gitmodules
  2. 16 0
      Makefile
  3. 2 2
      devops/docker-compose.yaml
  4. 7 1
      devops/router.yaml
  5. 1 0
      graph/auth
  6. 7 0
      supergraph.yaml

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "graph/auth"]
+	path = graph/auth
+	url = ssh://git@git.beejay.kim:2222/Craft/Auth.git

+ 16 - 0
Makefile

@@ -0,0 +1,16 @@
+.DEFAULT_GOAL := all
+.DELETE_ON_ERROR:
+.SUFFIXES:
+
+.PHONY: all
+all: deps build
+
+.PHONY: deps
+deps:
+	-@echo "-> $@"
+	git submodule update --remote --init
+
+.PHONY: build
+build:
+	-@echo "-> $@"
+	rover supergraph compose --config ./supergraph.yaml --output ./devops/prod-schema.graphql

+ 2 - 2
devops/docker-compose.yaml

@@ -40,9 +40,9 @@ services:
         "--hot-reload",
         "--anonymous-telemetry-disabled",
         "--listen",
-        "0.0.0.0:3128"
+        "0.0.0.0:8080"
       ]
     ports:
-      - "3128:3128"
+      - "8080:8080"
       - "9090:9090"
     restart: unless-stopped

+ 7 - 1
devops/router.yaml

@@ -8,11 +8,17 @@ supergraph:
   introspection: true
 
 override_subgraph_url:
-  auth: http://host.docker.internal:8080/query
+  auth: http://host.docker.internal:3128/query
 
 include_subgraph_errors:
   all: true
 
+headers:
+  all:
+    request:
+      - propagate:
+          named: "Authorization"
+
 traffic_shaping:
   deduplicate_variables: true
   router:

+ 1 - 0
graph/auth

@@ -0,0 +1 @@
+Subproject commit 31aa6eb6260ddbd11510ddac986fcca5a947269c

+ 7 - 0
supergraph.yaml

@@ -0,0 +1,7 @@
+federation_version: =2.3.2
+
+subgraphs:
+  auth:
+    routing_url: https://auth.craft.beejay.kim
+    schema:
+      file: ./graph/auth/graph/schema.graphql