Building a Modular Docker Compose Stack with TSDProxy #117
Kendellb
started this conversation in
Show and tell
Replies: 1 comment
-
This is exactly what I was looking for. I'm on unraid. I am going to experiment and see what's possible. I hope to report back. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To streamline the deployment and management of services on your Tailnet, I’ve set up a centralized compose file that gives control over multiple Docker containers, while maintaining the flexibility of individual service management.
The TSDProxy container must be part of the same network as the other Docker containers you wish to manage. Initially, I placed the TSDProxy container within my ARR stack, and it worked seamlessly. However, to extend the functionality, I wanted to include additional services (e.g., SearxNG) without directly integrating them into the same Compose file.
By leveraging Docker Compose
include:
option, I was able to reference external Compose files, such as searxng-compose.yml, within the main ARR stack configuration. This enabled TSDProxy to handle the external containers.To maintain modularity and ease of management, I organize my Docker containers into separate directories, each with its own docker-compose.yml file. These directories can be independently updated or maintained without disrupting the entire stack.
The main Docker Compose file (referred to as the "master Compose") includes references to all other Docker Compose files. This setup allows for centralized deployment and management while ensuring that each container remains in the same Tailnet. Below is an example configuration:
!WARNING! these are just examples please refer to the projects documentation docker compose files.
In this setup, the tsdproxy service manages all the containers defined in the included Compose files, including those for external services like SearxNG and my whole arrstack.
To ensure that each service is correctly registered with TSDProxy, you’ll need to add appropriate labels in the individual docker-compose.yml files for each container. Here’s an example of how you would add labels for a service like SearxNG:
Then when you make changes to your docker containers or settings of a container you can just
docker compose restart <container>
while in the tsdproxy directory.Feel free to let me know if there is anyway to improve this, just wanted to share my setup with others as this is a new project and can be run in many of ways. Thanks to @almeidapaulopt for this amazing project!
Update: If services have same services in there stacks such as redis or a database. Rename the service to say mainService_redis , Else there will be conflicts.
Beta Was this translation helpful? Give feedback.
All reactions