2
0
Эх сурвалжийг харах

Add Cloudflare Support

Added Cloudflare Support
Yevhenii Pyltiai 1 жил өмнө
parent
commit
2cd5b16ade

+ 13 - 0
README.md

@@ -582,6 +582,19 @@ Next, open up the `bin/start` helper script and uncomment the line:
 
 Finally, restart the containers with `bin/restart`. After doing so, everything is now configured and you can use a browser extension to profile your Magento store with Blackfire.
 
+### Cloudflare Tunnel
+
+These docker images have built-in support for Cloudflare Tunnel. It can be useful for testing implementations that require some third-party integrations involving allow-listing domains. Since your local app cannot be allow-listed by other services - you can use Cloudflare Tunnel to get public hostname that can be allow-listed on the other service.
+
+To use it, first create a tunnel in Cloudflare Zero Trust and add the token to `env/cloudflare.env`.
+
+Next, uncomment Cloudlfare Tunnel section in main `compose.yaml`.
+
+Finally, restart the containers with `bin/restart`.
+In Cloudflare Tunnel configuration - configure service URL to use type `HTTPS` and URL `{name of app container}:{HTTPS port of app container}`, for example - `demo-app-1:8443`. Enable `No TLS Verify` option since our local certificates are self-signed. You should now be able to access your app via public hostname, defined in Cloudflare Tunnel.
+
+NOTE: do not leave instances with Cloudflare Tunnel enabled running long-term, as your instance is publicly available to the world. You should ideally turn off tunnel container once testing is finished. 
+
 ### MFTF
 
 To work with MFTF you will need to first enable the `selenium` image in the `compose.dev.yaml` file. Then, you will need to run the following.

+ 8 - 1
compose/compose.yaml

@@ -98,7 +98,14 @@ services:
     image: sj26/mailcatcher
     ports:
       - "1080:1080"
-
+  
+  ## Cloudflare tunnel support, uncomment to enable
+  #tunnel:
+  #  container_name: cloudflared-tunnel
+  #  image: cloudflare/cloudflared:latest
+  #  command: tunnel run
+  #  env_file: env/cloudflare.env
+  
   ## Blackfire support, uncomment to enable
   #blackfire:
   #  image: blackfire/blackfire:2

+ 1 - 0
compose/env/cloudflare.env

@@ -0,0 +1 @@
+TUNNEL_TOKEN=