Skip to content

Commit

Permalink
Enhance cloudflare tunnel ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
neoxelox committed Sep 5, 2024
1 parent 9aef569 commit 5ccd79d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To make this environment work you will have to make the following changes:

3. Download both Tunnels certificates to `envs/prod/certs/` (which is ignored).

4. Fill both Tunnels configuration files `envs/prod/cloudflared-ext.yaml & cloudflared-int.yaml` with the Tunnel ID and credentials path.
4. Fill both Tunnels configuration files `envs/prod/cloudflared-ext.yaml & cloudflared-int.yaml` with the Tunnel ID, credentials path and hostnames.

5. Change the `scripts/tasks.py` `build & deploy` tasks to tag and push your service images to your registry of preference (it should be a private registry...).

Expand Down
1 change: 1 addition & 0 deletions envs/prod/cloudflared-ext.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ credentials-file: /etc/cloudflared/certs/.json

ingress:
- hostname: api.
path: ^/ext
service: http://api:1111
- service: http_status:404
2 changes: 2 additions & 0 deletions envs/prod/cloudflared-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ tunnel:
credentials-file: /etc/cloudflared/certs/.json

ingress:
- hostname: api.
service: http://api:1111
- hostname: metabase.
service: http://metabase:2222
- hostname: asynqmon.
Expand Down
2 changes: 2 additions & 0 deletions envs/prod/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ services:
env_file: ./.env
command: "tunnel --no-autoupdate --origincert /etc/cloudflared/certs/cert.pem run ${CLOUDFLARE_TUNNEL_INT_NAME}"
depends_on:
- api
- metabase
- asynqmon
links:
- api:api
- metabase:metabase
- asynqmon:asynqmon
volumes:
Expand Down

0 comments on commit 5ccd79d

Please sign in to comment.