Skip to content

Commit

Permalink
[deploy] use docs subdomain as a primary
Browse files Browse the repository at this point in the history
  • Loading branch information
capcom6 committed Dec 1, 2024
1 parent 08083f4 commit b8f5706
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
35 changes: 28 additions & 7 deletions deployments/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,51 @@ resource "docker_service" "app" {
}

labels {
label = "traefik.http.routers.${var.app-name}-new.rule"
label = "traefik.http.routers.${var.app-name}-root.rule"
value = "Host(`sms-gate.app`)"
}
labels {
label = "traefik.http.routers.${var.app-name}-new.entrypoints"
label = "traefik.http.routers.${var.app-name}-root.entrypoints"
value = "https"
}
labels {
label = "traefik.http.routers.${var.app-name}-new.tls.certresolver"
label = "traefik.http.routers.${var.app-name}-root.tls.certresolver"
value = "le"
}
labels {
label = "traefik.http.routers.${var.app-name}-root.middlewares"
value = "redirect-to-main-docs"
}

labels {
label = "traefik.http.routers.${var.app-name}-docs.rule"
value = "Host(`docs.sms-gate.app`)"
label = "traefik.http.routers.${var.app-name}-capcom.rule"
value = "Host(`sms.capcom.me`)"
}
labels {
label = "traefik.http.routers.${var.app-name}-docs.entrypoints"
label = "traefik.http.routers.${var.app-name}-capcom.entrypoints"
value = "https"
}
labels {
label = "traefik.http.routers.${var.app-name}-docs.tls.certresolver"
label = "traefik.http.routers.${var.app-name}-capcom.tls.certresolver"
value = "le"
}
labels {
label = "traefik.http.routers.${var.app-name}-capcom.middlewares"
value = "redirect-to-main-docs"
}

labels {
label = "traefik.http.middlewares.redirect-to-main-docs.redirectregex.regex"
value = "^https://(sms\\.capcom\\.me|sms-gate\\.app)(.*)"
}
labels {
label = "traefik.http.middlewares.redirect-to-main-docs.redirectregex.replacement"
value = "https://docs.sms-gate.app$${2}"
}
labels {
label = "traefik.http.middlewares.redirect-to-main-docs.redirectregex.permanent"
value = true
}

labels {
label = "traefik.http.services.${var.app-name}.loadbalancer.server.port"
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The SMS Gateway for Android™ can operate in three distinct modes, all utilizing the same API:

1. [**Local Server**](./local-server.md): Operate entirely within your local network by running the server on your Android device. This mode is perfect for quick setups with no need for Internet access. For remote access, you may need to configure your network settings and implement additional security measures.
2. [**Public Cloud Server**](./public-cloud-server.md): Easily connect via the Internet using the public server at `sms-gate.app`. Messages are routed through this server to your devices, simplifying the setup without requiring network adjustments. This mode is suitable for non-sensitive data only. For more secure communication, please refer to the [end-to-end encryption section](../privacy/encryption.md).
2. [**Public Cloud Server**](./public-cloud-server.md): Easily connect via the Internet using the public server at `api.sms-gate.app`. Messages are routed through this server to your devices, simplifying the setup without requiring network adjustments. This mode is suitable for non-sensitive data only. For more secure communication, please refer to the [end-to-end encryption section](../privacy/encryption.md).
3. [**Private Server**](./private-server.md): Deploy your own server instance and connect your Android devices to ensure maximum privacy. We will not have access to your message content, making this the preferred option for sensitive communication. However, this option requires setting up and maintaining your own infrastructure, including a database and server application.

To begin with any of these modes, you must first install the SMS Gateway for Android app on your device, as described in the [Installation](../installation.md) section.
Expand All @@ -12,4 +12,4 @@ For more details on how to use the API, please consult the [API](../integration/

## Building Your Own Gateway

Building your own gateway is an option that allows you to create an independent infrastructure without any connection to the public server at `sms-gate.app`. In most cases, this is not necessary, and you can use the [Private Server](./private-server.md) mode with all of its privacy features. However, if you require full control, please see [Custom Gateway Setup](./custom-gateway.md) section.
Building your own gateway is an option that allows you to create an independent infrastructure without any connection to the public server at `api.sms-gate.app`. In most cases, this is not necessary, and you can use the [Private Server](./private-server.md) mode with all of its privacy features. However, if you require full control, please see [Custom Gateway Setup](./custom-gateway.md) section.
2 changes: 1 addition & 1 deletion docs/getting-started/private-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img src="/assets/private-server-arch.png" alt="Architecture of the Private Server mode">
</div>

To enhance privacy, you can host a private server within your own infrastructure, ensuring that all messages remain solely on devices you control. The only required external network connection is for sending push notifications via the public server at `sms-gate.app`. This setup eliminates the need to configure Firebase Cloud Messaging (FCM) or rebuild the Android app, but it does demand some technical know-how.
To enhance privacy, you can host a private server within your own infrastructure, ensuring that all messages remain solely on devices you control. The only required external network connection is for sending push notifications via the public server at `api.sms-gate.app`. This setup eliminates the need to configure Firebase Cloud Messaging (FCM) or rebuild the Android app, but it does demand some technical know-how.

### Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion docs/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
User-agent: *
Allow: /
Sitemap: https://sms-gate.app/sitemap.xml
Sitemap: https://docs.sms-gate.app/sitemap.xml
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: SMS Gateway for Android™
site_url: https://sms-gate.app
site_url: https://docs.sms-gate.app
repo_url: https://github.com/capcom6/android-sms-gateway
site_description: Official documentation for SMS Gateway for Android
site_author: Aleksandr Soloshenko
Expand Down

0 comments on commit b8f5706

Please sign in to comment.