From 950914f723ee3853cc52fafc9c0401d0ef75dc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilson=20J=C3=BAnior?= Date: Tue, 23 Jul 2024 10:11:40 -0300 Subject: [PATCH] Add docs about app with multiple processes --- src/user_guides/deploy_go_apps.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/user_guides/deploy_go_apps.md b/src/user_guides/deploy_go_apps.md index 820156b..f2347d9 100644 --- a/src/user_guides/deploy_go_apps.md +++ b/src/user_guides/deploy_go_apps.md @@ -89,3 +89,33 @@ tsuru will compile and run the application automatically. It’s done! Now we have a simple go project deployed on tsuru. Now we can access your app in the URL displayed in app info (“helloworld.192.168.50.4.nip.io” in this case). + + +# Deploy multiple processes aplication + +Teams often design their applications to distribute responsibilities across multiple processes, such as an API and a worker. While these processes might share the same repository, they typically have different entry points. + +Our GO platform simplifies handling this scenario, but it's essential to standardize your application. + +## Entry points + +You must organize the entry points in the filesystem to look like this: + +``` + +# to create myapp-api binary +cmd/myapp-api/main.go + + +# to create myapp-worker binary +cmd/myapp-worker/main.go +``` + +you can put every shared package outside of directory cmd. + + +for each binary you need to specify on `Procfile` +``` +web: myapp-api +worker: myapp-worker +``` \ No newline at end of file