Skip to content

Commit

Permalink
Merge branch 'development' into feature-113
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobehling authored Jul 13, 2024
2 parents 2bcaced + 2eebf4d commit 46a98f7
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 13 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ networks:
ipam:
config:
- subnet: 172.177.0.0/16

65 changes: 65 additions & 0 deletions prod/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version: '3.4'

services:
venueless:
image: eventyay/eventyay-video:development
container_name: venueless
ports:
- "8375:80"
environment:
- DJANGO_SETTINGS_MODULE=venueless.settings
- LC_ALL=C.UTF-8
- IPYTHONDIR=/data/.ipython
- VENUELESS_COMMIT_SHA=${COMMIT}
- VENUELESS_DB_TYPE=postgresql
- VENUELESS_DB_NAME=eventyay_db
- VENUELESS_DB_USER=postgres_db_user_changeme
- VENUELESS_DB_PASS=postgres_db_pwd_changeme
- VENUELESS_DB_HOST=venueless-db
- VENUELESS_REDIS_URLS=redis://venueless-redis:6379/0,redis://venueless-redis1:6379/0
- VENUELESS_DATA_DIR=/data
- VENUELESS_MEDIA_URL=http://localhost:8375/media/
- VENUELESS_REDIS_USE_PUBSUB=true
depends_on:
- venueless-db
- venueless-redis
- venueless-redis1
volumes:
- /etc/venueless:/etc/venueless
- /data:/data
entrypoint: ["/usr/local/bin/venueless"]
command: ["all"]

venueless-webapp:
image: eventyay/eventyay-video:development
container_name: venueless-webapp
ports:
- "8002:8880"
environment:
- NODE_OPTIONS=--openssl-legacy-provider
entrypoint: [""]
command: ["npm", "start", "--", "--host", "0.0.0.0"]
working_dir: /venueless/webapp

venueless-redis:
image: redis:latest
container_name: venueless-redis

venueless-redis1:
image: redis:latest
container_name: venueless-redis1

venueless-db:
image: postgres:15
container_name: venueless-db
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_INITDB_ARGS=--auth-host=md5
- POSTGRES_HOST_AUTH_METHOD=md5
- POSTGRES_DB=eventyay_db
- POSTGRES_USER=postgres_db_user_changeme
- POSTGRES_PASSWORD=postgres_db_pwd_changeme

volumes:
postgres_data:
6 changes: 3 additions & 3 deletions server/venueless/core/services/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
from venueless.core.models.auth import ShortToken
from venueless.core.models.room import (
RoomConfigSerializer,
RoomView,
approximate_view_number,
RoomView
)
from venueless.core.permissions import Permission

Expand Down Expand Up @@ -168,7 +167,8 @@ def get_room_config(room, permissions):
}

if hasattr(room, "current_roomviews"):
room_config["users"] = approximate_view_number(room.current_roomviews)
# set actual viewer count instead of approximate text
room_config["users"] = room.current_roomviews

for module in room.module_config:
module_config = copy.deepcopy(module)
Expand Down
11 changes: 4 additions & 7 deletions server/venueless/live/modules/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from venueless.core.models.room import (
AnonymousInvite,
RoomConfigSerializer,
approximate_view_number,
)
from venueless.core.permissions import Permission
from venueless.core.services.poll import get_polls, get_voted_polls
Expand Down Expand Up @@ -184,20 +183,18 @@ async def _leave_room(self, room):

async def _update_view_count(self, room, actual_view_count):
async with aredis(f"room:approxcount:known:{room.pk}") as redis:
next_value = approximate_view_number(actual_view_count)
prev_value = await redis.getset(
f"room:approxcount:known:{room.pk}", next_value
f"room:approxcount:known:{room.pk}", actual_view_count
)
if prev_value:
prev_value = prev_value.decode()
if prev_value != next_value:
if prev_value != actual_view_count:
await redis.expire(f"room:approxcount:known:{room.pk}", 900)
# broadcast actual viewer count instead of approximate text
await self.consumer.channel_layer.group_send(
GROUP_WORLD.format(id=self.consumer.world.pk),
{
"type": "world.user_count_change",
"room": str(room.pk),
"users": next_value,
"users": actual_view_count,
},
)

Expand Down
10 changes: 8 additions & 2 deletions webapp/src/components/RoomsSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ transition(name="sidebar")
template(v-else)
.room-icon(aria-hidden="true")
.name(v-html="$emojify(stage.room.name)")
.buffer
template(v-if="stage.room.users")
i.mdi.mdi-account-group.icon-viewer
.name(v-html="stage.room.users")
.group-title#chats-title(v-if="roomsByType.videoChat.length || roomsByType.textChat.length || hasPermission('world:rooms.create.chat') || hasPermission('world:rooms.create.bbb')")
span {{ $t('RoomsSidebar:channels-headline:text') }}
.buffer
Expand Down Expand Up @@ -293,7 +297,7 @@ export default {
&.router-link-exact-active, &.active
.room-icon::before
color: var(--clr-sidebar-text-secondary)
.room-icon
.room-icon, .icon-viewer
width: 22px
&::before
font-family: "Material Design Icons"
Expand All @@ -303,7 +307,9 @@ export default {
margin: 0 auto
display: block
width: 20px
.icon-viewer
&::before
line-height: 32px
&.starts-with-emoji
padding: 0 18px
// .room-icon
Expand Down

0 comments on commit 46a98f7

Please sign in to comment.