Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Commit e3aae47

Browse files
committed
merge main
2 parents 466e03a + b7f00cb commit e3aae47

File tree

74 files changed

+2560
-2731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2560
-2731
lines changed

.env.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#JELLYFISH
1+
#FISHJAM
22
# TURN default configuration
33
# note: loopback address as EXTERNAL_IP cannot be used inside a Docker container
44
# EXTERNAL_IP=<your_public_ip_address>
55
JF_SERVER_API_TOKEN="development"
66

77
# SSL
88
DOMAIN=localhost
9-
# BE_JF_ADDRESSES=<jellyfish_domain_address1> <jellyfish_domain_address2>
9+
# BE_JF_ADDRESS=<fishjam_domain_address>
1010
# BE_HOST=<backend_domain_address>
1111
# BE_JF_SECURE_CONNECTION=false
1212
# JF_CHECK_ORIGIN=false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Staging Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- "debug-staging"
6+
paths:
7+
- "**"
8+
9+
env:
10+
DOMAIN: room.fishjam.work
11+
BE_HOST: server.room.fishjam.work
12+
PROJECT: staging
13+
COMPOSE_FILE_NAME: docker-compose-deploy.yaml
14+
15+
jobs:
16+
deploy1:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Debug staging
20+
uses: JimCronqvist/action-ssh@master
21+
with:
22+
hosts: ${{ secrets.STAGING_HOST }}
23+
privateKey: ${{ secrets.SSH_PRIV_KEY }}
24+
command: |
25+
cat test.txt
26+

.github/workflows/production_build_and_deploy.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
- 'v*.*.*'
66

77
env:
8-
DOMAIN: jellyroom.membrane.stream
9-
BE_HOST: server.jellyroom.membrane.stream
8+
DOMAIN: room.fishjam.stream
9+
BE_HOST: server.room.fishjam.stream
1010
PROJECT: production
1111
COMPOSE_FILE_NAME: docker-compose-deploy.yaml
1212

@@ -20,20 +20,20 @@ jobs:
2020
id: versions
2121
run: |
2222
cat << EOF >> $GITHUB_OUTPUT
23-
jellyroom=${GITHUB_REF#refs/*/}
24-
jellyfish=$(cat .jellyfish-version)
23+
fishjam_room=${GITHUB_REF#refs/*/}
24+
fishjam=$(cat .fishjam-version)
2525
EOF
2626
2727
- name: Prepare .env file for the deployment
2828
id: variables_population
2929
run: |
3030
echo "DOMAIN=${{env.DOMAIN}}
31-
JELLYROOM_VERSION=${{ steps.versions.outputs.jellyroom }}
32-
JELLYFISH_VERSION=${{ steps.versions.outputs.jellyfish }}
31+
FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }}
32+
FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }}
3333
JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_PRODUCTION}}
3434
BE_HOST=${{env.BE_HOST}}
3535
BE_JF_SECURE_CONNECTION=true
36-
BE_JF_ADDRESSES=${{vars.JF1_HOST_CLOUD_PRODUCTION}}" > .env
36+
BE_JF_ADDRESS=${{vars.JF_HOST_CLOUD_PRODUCTION}}" > .env
3737
3838
- name: Remove old containers on first host
3939
uses: JimCronqvist/action-ssh@master

.github/workflows/sandbox_build_and_deploy.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
- "**"
88

99
env:
10-
DOMAIN: jellyroom.membrane.ovh
11-
BE_HOST: server.jellyroom.membrane.ovh
10+
DOMAIN: room.fishjam.ovh
11+
BE_HOST: server.room.fishjam.ovh
1212
PROJECT: sandbox
1313
COMPOSE_FILE_NAME: docker-compose-deploy.yaml
1414

@@ -22,33 +22,33 @@ jobs:
2222
id: versions
2323
run: |
2424
cat << EOF >> $GITHUB_OUTPUT
25-
jellyroom=${GITHUB_SHA:0:7}
26-
jellyfish=$(cat .jellyfish-version)
25+
fishjam_room=${GITHUB_SHA:0:7}
26+
fishjam=$(cat .fishjam-version)
2727
EOF
2828
2929
- name: Prepare .env file for the deployment
3030
id: variables_population
3131
run: |
3232
echo "DOMAIN=${{env.DOMAIN}}
33-
JELLYROOM_VERSION=${{ steps.versions.outputs.jellyroom }}
34-
JELLYFISH_VERSION=${{ steps.versions.outputs.jellyfish }}
33+
FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }}
34+
FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }}
3535
JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_SANDBOX}}
3636
BE_HOST=${{env.BE_HOST}}
3737
BE_JF_SECURE_CONNECTION=true
38-
BE_JF_ADDRESSES=${{vars.JF_HOST_CLOUD_SANDBOX}}" > .env
38+
BE_JF_ADDRESS=${{vars.JF_HOST_CLOUD_SANDBOX}}" > .env
3939
4040
- name: Remove old containers on first host
4141
uses: JimCronqvist/action-ssh@master
4242
with:
43-
hosts: ${{ secrets.SANDBOX_IP }}
43+
hosts: ${{ secrets.SANDBOX_HOST }}
4444
privateKey: ${{ secrets.SSH_PRIV_KEY }}
4545
command: |
4646
docker ps -aq | xargs -r docker stop | xargs -r docker rm
4747
4848
- name: Deploy docker compose to a pre-configured server on first host
4949
uses: TapTap21/docker-remote-deployment-action@v1.1
5050
with:
51-
remote_docker_host: ${{ secrets.SANDBOX_IP }}
51+
remote_docker_host: ${{ secrets.SANDBOX_HOST }}
5252
ssh_private_key: ${{ secrets.SSH_PRIV_KEY }}
5353
ssh_public_key: ${{ secrets.SSH_PUB_KEY }}
5454
stack_file_name: ${{ env.COMPOSE_FILE_NAME }}
+15-15
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
name: Staging Build and Deploy
22
on:
33
push:
4-
branches:
4+
branches:
55
- "main"
66

7-
env:
8-
DOMAIN: jellyroom.membrane.work
9-
BE_HOST: server.jellyroom.membrane.work
7+
env:
8+
DOMAIN: room.fishjam.work
9+
BE_HOST: server.room.fishjam.work
1010
PROJECT: staging
1111
COMPOSE_FILE_NAME: docker-compose-deploy.yaml
1212

1313
jobs:
1414
deploy1:
1515
runs-on: ubuntu-latest
16-
steps:
16+
steps:
1717
- uses: actions/checkout@v2
1818

1919
- name: Set versions
2020
id: versions
2121
run: |
2222
cat << EOF >> $GITHUB_OUTPUT
23-
jellyroom=${GITHUB_SHA:0:7}
24-
jellyfish=$(cat .jellyfish-version)
23+
fishjam_room=${GITHUB_SHA:0:7}
24+
fishjam=$(cat .fishjam-version)
2525
EOF
2626
2727
- name: Prepare .env file for the deployment
2828
id: variables_population
2929
run: |
30-
echo "DOMAIN=${{env.DOMAIN}}
31-
JELLYROOM_VERSION=${{ steps.versions.outputs.jellyroom }}
32-
JELLYFISH_VERSION=${{ steps.versions.outputs.jellyfish }}
30+
echo "DOMAIN=${{env.DOMAIN}}
31+
FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }}
32+
FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }}
3333
JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_STAGING}}
3434
BE_HOST=${{env.BE_HOST}}
3535
BE_JF_SECURE_CONNECTION=true
36-
BE_JF_ADDRESSES=${{vars.JF1_HOST_CLOUD_STAGING}}" > .env
36+
BE_JF_ADDRESS=${{vars.JF_HOST_CLOUD_STAGING}}" > .env
3737
3838
- name: Remove old containers on first host
3939
uses: JimCronqvist/action-ssh@master
4040
with:
41-
hosts: ${{ secrets.STAGING_IP }}
41+
hosts: ${{ secrets.STAGING_HOST }}
4242
privateKey: ${{ secrets.SSH_PRIV_KEY }}
4343
command: |
44-
docker ps -aq | xargs -r docker stop | xargs -r docker rm
44+
docker ps -aq | xargs -r docker stop | xargs -r docker rm
4545
4646
- name: Deploy docker compose to a pre-configured server on first host
4747
uses: TapTap21/docker-remote-deployment-action@v1.1
4848
with:
49-
remote_docker_host: ${{ secrets.STAGING_IP }}
49+
remote_docker_host: ${{ secrets.STAGING_HOST }}
5050
ssh_private_key: ${{ secrets.SSH_PRIV_KEY }}
5151
ssh_public_key: ${{ secrets.SSH_PUB_KEY }}
5252
stack_file_name: ${{ env.COMPOSE_FILE_NAME }}
53-
args: -p ${{ env.PROJECT }} --env-file .env up -d --remove-orphans --build frontend backend
53+
args: -p ${{ env.PROJECT }} --env-file .env up -d --remove-orphans --build frontend backend

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ videoroom-*.tar
3535
.env
3636

3737
certbot/
38+
39+
.vscode

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "protos"]
22
path = protos
3-
url = https://github.com/jellyfish-dev/protos.git
3+
url = https://github.com/fishjam-dev/protos.git

README.md

+20-24
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Videoroom
22

33
Videoroom is an open-source, basic video conferencing platform using WebRTC.
4-
It is based on [jellyfish](https://github.com/jellyfish-dev/jellyfish), a general-purpose media server.
5-
Videoroom may be a good starting point for building your own real-time communication solution using Elixir and Jellyfish.
4+
It is based on [fishjam](https://github.com/fishjam-dev/fishjam), a general-purpose media server.
5+
Videoroom may be a good starting point for building your own real-time communication solution using Elixir and Fishjam.
66

77
## Running with Docker
88
The simplest way to run videoroom is with use of Docker.
@@ -15,9 +15,9 @@ docker compose --env-file .env.example up
1515

1616
Make sure to have installed [Elixir](https://elixir-lang.org/install.html) and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) first.
1717

18-
Running the Videoroom requires connecting to an instance of [Jellyfish Server](https://github.com/jellyfish-dev/jellyfish).
18+
Running the Videoroom requires connecting to an instance of [Fishjam Server](https://github.com/fishjam-dev/fishjam).
1919

20-
When running locally, you can start an instance of Jellyfish inside docker using docker compose.
20+
When running locally, you can start an instance of Fishjam inside docker using docker compose.
2121

2222
```sh
2323
EXTERNAL_IP=<your ip in local network> docker compose -f docker-compose-dev.yaml up
@@ -27,26 +27,26 @@ Now you can start the Videoroom backend:
2727
- Run `mix setup` to install and setup dependencies
2828
- Start Phoenix server with `mix phx.server`
2929

30-
When running the build version of the Phoenix app, you must specify the addresses of the Jellyfish and backend service.
30+
When running the build version of the Phoenix app, you must specify the addresses of the Fishjam and backend service.
3131
As well as the authentication token via the environment variables:
3232

3333
```sh
34-
BE_JF_ADDRESSES=<IP_ADDRESS1>:<PORT1> OR <DOMAIN1> <IP_ADDRESS2>:<PORT2> OR <DOMAIN2> #Example of using two jellyfishes: `127.0.0.1:5002 jellyroom.membrane.ovh`, if not provided in dev environment `localhost:5002 localhost:5003` is used.
35-
BE_JF_SERVER_API_TOKEN=<TOKEN> #This must be the same token that was setup in jellyfish. In `docker-compose-dev.yaml` we setup `development` and this variable is used by default in `dev` environment
34+
BE_JF_ADDRESS=<IP_ADDRESS>:<PORT1> OR <DOMAIN1> #Example `127.0.0.1:5002 OR room.fishjam.ovh`, if not provided in dev environment `localhost:5002` is used.
35+
BE_JF_SERVER_API_TOKEN=<TOKEN> #This must be the same token that was setup in fishjam. In `docker-compose-dev.yaml` we setup `development` and this variable is used by default in `dev` environment
3636
```
3737

38-
Optionally, in production, these variables can be set:
38+
Optionally, in production, these variables can be set:
3939
* `BE_PEER_JOIN_TIMEOUT` - can be used to limit the period in which a new peer must join the meeting,
40-
* `BE_JF_SECURE_CONNECTION` - enforces connecting the backend to jellyfish through `wss` protocol,
40+
* `BE_JF_SECURE_CONNECTION` - enforces connecting the backend to fishjam through `wss` protocol,
4141
* `BE_HOST` - address of backend
42-
* `JF_CHECK_ORIGIN` - define whether jellyfish should check origin of incoming requests
42+
* `JF_CHECK_ORIGIN` - define whether fishjam should check origin of incoming requests
4343

4444

4545
Next you have to start a Videoroom frontend:
4646
- Run `npm ci --prefix=assets` to install and setup dependencies
4747
- Start vite server with `npm run dev --prefix=assets`
4848

49-
Now you have all needed components to use jellyfish videoroom.
49+
Now you have all needed components to use fishjam videoroom.
5050

5151
## Production
5252

@@ -56,22 +56,18 @@ You can copy the `.env.example` file to `.env` and adjust it to your needs.
5656

5757
## Deployment with load-balancing
5858

59-
`docker-compose.yaml` allows to run a jellyfish videoroom with multiple jellyfishes but all of that runs on the same machine.
60-
For properly using load-balancing two machines will be needed and `docker-compose-deploy.yaml` will be used.
59+
`docker-compose.yaml` allows to run a fishjam videoroom with multiple fishjams but all of that runs on the same machine.
60+
For properly using load-balancing two machines will be needed and `docker-compose-deploy.yaml` will be used.
6161
You can see our deployment workflow [here](.github/workflows/test_build_and_deploy.yml).
62-
This deployment is pretty simple.
63-
All containers besides `jellyfish2` are started on node1 and `jellyfish2` is started on node2.
62+
This deployment is pretty simple.
63+
All containers besides `fishjam2` are started on node1 and `fishjam2` is started on node2.
6464
All environment variables used in our deployment are presented below:
6565

6666
```sh
6767
DOMAIN=<FRONTEND_DOMAIN>
68-
JF1_IP=<NODE1_IP> # IP address of first node on which jellyfish will be run
69-
JF2_IP=<NODE2_IP> # IP address of second node on which jellyfish will be run
70-
JF_SERVER_API_TOKEN=<API_TOKEN> #The same API token is used for all jellyfishes
71-
JF1_HOST=<DOMAIN_JELLYFISH1> OR <JF1_IP>:<JELLYFISH1_PORT> # Value passed to jellyfish and returns by it when creating a room on this speicific jellyfish
72-
JF2_HOST=<DOMAIN_JELLYFISH2> OR <JF2_IP>:<JELLYFISH2_PORT>
73-
BE_JF_ADDRESSES=<JF1_HOST> <JF2_HOST> #Used by backend to create a notifier to one of jellyfishes
74-
PROMETHEUS_TARGETS=<JF1_IP>:9568,<JF2_IP>:9568 #Addresses on which prometheus will query for data
68+
JF_SERVER_API_TOKEN=<API_TOKEN> #The same API token is used for all fishjams
69+
BE_JF_ADDRESS=<DOMAIN_FISHJAM1> OR <FISHJAM_IP>:<FISHJAM_PORT> #Used by backend to create a notifier and to communicate with fishjam
70+
PROMETHEUS_TARGETS=<FISHJAM_IP>:9568 #Addresses on which prometheus will query for data
7571
BE_HOST=<BACKEND_DOMAIN>
7672
GF_SECURITY_ADMIN_PASSWORD=<GRAFANA_PASSWORD>
7773
GF_SECURITY_ADMIN_USER=<GRAFANA_LOGIN>
@@ -83,9 +79,9 @@ JF_CHECK_ORIGIN=false
8379

8480
We use [Divo](https://hexdocs.pm/divo/readme.html) in tests, which is responsible for starting docker containers.
8581

86-
When running locally run tests using `mix test`, which starts Jellyfish in a container.
82+
When running locally run tests using `mix test`, which starts Fishjam in a container.
8783

88-
On CI both Jellyfish and the tests are run inside docker. If needed, e.g. when the tests are failing on the CI, but not locally you can simulate those conditions with `mix integration_test`.
84+
On CI both Fishjam and the tests are run inside docker. If needed, e.g. when the tests are failing on the CI, but not locally you can simulate those conditions with `mix integration_test`.
8985

9086
## Copyright and License
9187

assets/.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nodejs 18.14.2
1+
nodejs v20.13.1

assets/Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ FROM alpine:3.18 as builder
44
WORKDIR '/app'
55

66
ARG FE_BE_HOST
7-
ARG JELLYROOM_VERSION
8-
ARG JELLYFISH_VERSION
7+
ARG FISHJAM_ROOM_VERSION
8+
ARG FISHJAM_VERSION
99
ENV VITE_BE_HOST=$FE_BE_HOST
10-
ENV VITE_JELLYROOM_VERSION=$JELLYROOM_VERSION
11-
ENV VITE_JELLYFISH_VERSION=$JELLYFISH_VERSION
10+
ENV VITE_FISHJAM_ROOM_VERSION=$FISHJAM_ROOM_VERSION
11+
ENV VITE_FISHJAM_VERSION=$FISHJAM_VERSION
1212

1313
# Install nodejs and npm
1414
RUN apk add --no-cache nodejs npm
@@ -19,7 +19,7 @@ RUN adduser --disabled-password --gecos "" node
1919
# Own the app directory
2020
RUN chown node:node ./
2121

22-
# It's adviced to run the container as non-root user
22+
# It's adviced to run the container as non-root user
2323
# for added security if the base image has the user
2424
USER node
2525

@@ -29,7 +29,7 @@ COPY package*.json ./
2929
# Install dependencies
3030
RUN npm ci
3131

32-
# Copy application files
32+
# Copy application files
3333
COPY . .
3434

3535
# Build the app

0 commit comments

Comments
 (0)