Created
February 7, 2025 20:22
-
-
Save Hiweus/a6480698bf56ee4f9858035dd9e02a31 to your computer and use it in GitHub Desktop.
Revisions
-
Hiweus created this gist
Feb 7, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # Api gateway Create a api gateway and serve ssl ## Configuring localhost ssl ```shell mkcert -install mkcert "*.local.gd" local.gd ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ services: # curl https://api.local.gd:8080/api api: image: devopsfaith/krakend:2.9.1 ports: - "8080:8080" volumes: - ./krakend.json:/etc/krakend/krakend.json - ./certs:/certs backend: image: busybox init: true working_dir: /www command: httpd -v -f -p 80 ports: - "8099:80" volumes: - ./backend:/www
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ { "version": 3, "tls": { "public_key": "/certs/fullchain.pem", "private_key": "/certs/privkey.pem" }, "name": "My API Gateway", "timeout": "3000ms", "cache_ttl": "300s", "endpoints": [ { "endpoint": "/api", "method": "GET", "backend": [ { "url_pattern": "/", "host": ["http://backend"], "encoding": "json" } ] } ] }