Skip to content

A sample files for various services using Project Tye and Docker Compose

License

Notifications You must be signed in to change notification settings

miroslavpopovic/tye-and-docker-compose-samples

Repository files navigation

Project Tye and Docker Compose samples

This is a sample library of ready-to-use tye.yaml and docker-compose.yml files. You can copy/paste the services from the YAML files to your project.

What is Project Tye?

Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and the ability to deploy microservices to Kubernetes with minimal configuration.

The Project Tye homepage is https://github.com/dotnet/tye/.

What is Docker Compose?

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.

More details can be found on Official Docker Docs.

Repository organization

The samples are organized into directories per service. Browse the directories to find the sample you need.

Known issues

Memory limit issue for ELK Stack

If you get an error max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] while running ELK stack, try to increase as described below.

More info can be found on StackOverflow.

Docker Desktop

Connect to WSL by running wsl command from PowerShell, or selecting "Ubuntu" or whatever your default WSL installation is from the Windows Terminal, and then run the following command:

sudo sysctl -w vm.max_map_count=262144

Rancher Desktop

Connect to your Rancher Desktop instance by running wsl -d rancher-desktop from PowerShell, or selecting "Rancher Desktop" from the Windows Terminal, and then run the following command:

sysctl -w vm.max_map_count=262144

Keycloak user already added

If you get error User with username 'admin' already added..., comment out KEYCLOAK_USER and KEYCLOAK_PASSWORD in the tye.yaml file and restart Tye. Wait for the Keycloak to get back up, uncomment and restart again. More details on StackOverflow.

Network issues

In some cases, the Rancher Desktop inside WSL behaves strangely, without an access to the network, and without an ability to download images. Apparently, the issue happens for those using VPNs. To fix it, follow these steps (from an admin Terminal):

wsl --shutdown
netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns

After executing those, restart your Windows machine.

If the above doesn't help, try to do Network Reset (search for it in Windows Search) before restarting Windows.

The steps are taken from WSL issue on GitHub.

Permission issues

Sometimes you can get various Access Denied and similar issues when trying to run Docker containers with volumes attached. It looks like Rancher Desktop WSL image doesn't have enough permissions on the host machine. To fix it, you need to allow permission on the mapped folder used as a volume.

I.e., if you map /.data/sqlserver to /var/opt/mssql/data, you need to allow access from Rancher Desktop WSL image to /.data/sqlserver folder. Open your Rancher Desktop WSL tab in Windows Terminal (it should be available from the dropdown menu), go to the .data folder and assign full permission to it.

cd ..
cd mnt/c/<path>/.data/ # use your own path here
ls
mkdir sqlserver # if it doesn't exist already
chmod 777 sqlserver -R # or chmod +rwx sqlserver -R

Some volume mappings are for deeper subfolders, i.e., .data/rabbitmq/logs. Make sure to change the permission to the mapped folder, in this case, you don't change permission to .data/rabbitmq, but to .data/rabbitmq/logs.

About

A sample files for various services using Project Tye and Docker Compose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published