https://github.com/mikebridge/akkawebindocker
An example of running Akka.Net from WebApi within Docker
https://github.com/mikebridge/akkawebindocker
akka-remoting akkadotnet csharp docker docker-compose dotnet-core
Last synced: 2 months ago
JSON representation
An example of running Akka.Net from WebApi within Docker
- Host: GitHub
- URL: https://github.com/mikebridge/akkawebindocker
- Owner: mikebridge
- Created: 2018-10-31T22:13:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-01T23:52:43.000Z (over 7 years ago)
- Last Synced: 2025-04-09T05:31:57.460Z (about 1 year ago)
- Topics: akka-remoting, akkadotnet, csharp, docker, docker-compose, dotnet-core
- Language: C#
- Size: 20.5 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Akka.Net Remote / WebApi / .NET Core 2.0 Example
Basic setup demo for Akka.Net in Docker.
This is configured as two Linux containers, one running a Console app with an Akka.Net ActorSystem, and the other running WebApi. The web api accesses
the Console app via Akka.Remote. The EchoConsole app has a single EchoActor.
## Build - Visual Studio w/o Docker
You can build and run both processes without docker from Visual Studio 2017 using `Debug -> Start Debugging`.
## Build - Linux/Mac/Windows Command Line & Docker
_Prerequisites:_
- [.NET Core sdk](https://www.microsoft.com/net/download)
- [Docker](https://docs.docker.com/)
You can build the app from the command line, build the docker containers from the published source, then launch the two processes together:
```powershell
> dotnet build
> dotnet publish
> docker-compose up -build
```
If this worked correctly, you should then be able to send a GET request to [http://localhost:3000/api/echo/test](http://localhost:3000/api/echo/test). Right now
the EchoActor does nothing but write to the debug console.
## Notes
- EchoConsoleApp -> Build -> Advanced Settings... -> Language version is set to "C# latest minor version (latest)" so
that [HostBuilder](https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.hostbuilder?view=aspnetcore-2.1) is available
(requires C# 7.1).
- Currently there may be some [problems with .NET Core 2.1](https://github.com/akkadotnet/akka.net/issues/3506)