Skip to content

Commit

Permalink
Add docs about app with multiple processes
Browse files Browse the repository at this point in the history
  • Loading branch information
wpjunior committed Jul 23, 2024
1 parent 33c7f57 commit 950914f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/user_guides/deploy_go_apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit 950914f

Please sign in to comment.