Skip to content

Commit

Permalink
Update Fly.io instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 committed Oct 7, 2024
1 parent 363fae9 commit eff331d
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions guides/deploying/fly.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

Elixir WebRTC-based apps can be easily deployed on [Fly.io](https://fly.io)!

There are just two things you need to do:
There are just three things you need to do:

* configure a STUN server both on the client and server side
* use a custom Fly.io IP filter on the server side
* slightly modify auto-generated Dockerfile

In theory, configuring a STUN server just on one side should be enough but we recommend doing it on both sides.

Expand All @@ -32,17 +33,25 @@ ip_filter = Application.get_env(:your_app, :ice_ip_filter)
In `runtime.exs`:

```elixir
if System.get_env("FLY_IO") do
if System.get_env("FLY_APP_NAME") do
config :your_app, ice_ip_filter: &ExWebRTC.ICE.FlyIpFilter.ip_filter/1
end
```

In fly.toml:
In Dockerfile:

```toml
[env]
# add one additional env
FLY_IO = 'true'
```
- ARG ELIXIR_VERSION=1.16.0
- ARG OTP_VERSION=26.2.1
- ARG DEBIAN_VERSION=bullseye-20231009-slim
+ ARG ELIXIR_VERSION=1.17.2
+ ARG OTP_VERSION=27.0.1
+ ARG DEBIAN_VERSION=bookworm-20240701-slim
- RUN apt-get update -y && apt-get install -y build-essential git \
- && apt-get clean && rm -f /var/lib/apt/lists/*_*
+ RUN apt-get update -y && apt-get install -y build-essential git pkg-config libssl-dev \
+ && apt-get clean && rm -f /var/lib/apt/lists/*_*
```

That's it!
Expand Down

0 comments on commit eff331d

Please sign in to comment.