-
Notifications
You must be signed in to change notification settings - Fork 72
Community docs for Coolify + Traefik reverse proxy. #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 characters
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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
layout: page | ||
title: Reverse-Proxy on Coolify with Traefik | ||
parent: Community Guides | ||
nav_order: 9 | ||
--- | ||
|
||
# Reverse proxy BlueMap on Coolify with Traefik | ||
|
||
Here are some examples of how you can use Coolify + Traefik (Installed by default on Coolify) to reverse-proxy your BlueMap. | ||
|
||
This is useful if you want to integrate your map in your website and you're using Coolify, or want to add SSL-capabilities. | ||
|
||
## Assumptions / Prerequisites | ||
- You have already added an `A record` to your domain pointing to your `public IP`. | ||
- If you're planning on using a `subdomain`, you have already added an `A record` with your subdomain e.g. `bluemap` to your domain pointing to your `public IP`. | ||
- You have access to Coolify's dashboard (`public_address:8000`). | ||
- You already have a daemon server installed on Coolify (`public_address:8000/servers`). | ||
- BlueMaps integrated webserver is running on port `8100` and accessible on `public_address:8100` e.g. **if** your public_address is `200.121.121.100` then BlueMaps should be accessible from `200.121.121.100:8100`. *(If that is not the case you'll need to replace `8100` with the actual port below)* | ||
|
||
> **Warning:**<br> | ||
> Telling the internal-webserver to connect to one specific address like e.g. `127.0.0.1`, | ||
> <br>from `webserver.conf` by adding `ip: "127.0.0.1"` WILL GIVE A **BAD GATEWAY** ERROR. | ||
{: .info } | ||
|
||
## BlueMap on a subdomain | ||
- Go to `Coolify's Dashboard -> Servers -> YourServer -> Proxy -> Dynamic Configurations` | ||
- Press `+ Add`, give it a name like e.g. `bluemap.yaml` and make something like this: | ||
|
||
BlueMap on a subdomain e.g. `https://bluemap.example.com` (replace `public_address` with your `public IP`): | ||
```yaml | ||
http: | ||
routers: | ||
map-router: | ||
rule: Host(`bluemap.example.com`) | ||
entryPoints: | ||
- https | ||
service: bluemap | ||
tls: | ||
certResolver: letsencrypt | ||
services: | ||
bluemap: | ||
loadBalancer: | ||
servers: | ||
- url: 'http://public_address:8100' | ||
``` | ||
Press `Save` and `Reload`. | ||
|
||
|
||
## BlueMap on a subdirectory of your website | ||
- Go to `Coolify's Dashboard -> Servers -> YourServer -> Proxy -> Dynamic Configurations`. | ||
- Press `+ Add`, give it a name like e.g. `bluemap.yaml` and make something like this: | ||
|
||
BlueMap on a subdirectory e.g `https://www.example.com/bluemap` (replace `public_address` with your `public IP`): | ||
```yaml | ||
http: | ||
routers: | ||
bluemap: | ||
entryPoints: | ||
- https | ||
rule: "Host(`www.example.com`) && PathPrefix(`/bluemap/`)" | ||
service: "bluemap" | ||
tls: | ||
certResolver: letsencrypt | ||
middlewares: | ||
- "bluemapprefix" | ||
services: | ||
bluemap: | ||
loadBalancer: | ||
servers: | ||
- url: "http://public_address:8100" | ||
middlewares: | ||
bluemapprefix: | ||
stripprefix: | ||
prefixes: "/bluemap/" | ||
``` | ||
Press `Save` and `Reload`. | ||
|
||
> **Warning:**<br> | ||
> If you're using CloudFlare, make sure to add to your DNS an A record with your subdomain e.g. `bluemap` pointing to your public IP. | ||
{: .info } |
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 characters
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 characters
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 characters
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 characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: It won't give a bad gateway if you use the correct ip, but networking is hard, and it's probably the easiest to not change this, that's true :D