Skip to content

Commit

Permalink
Merge pull request #210 from fleizean/wss
Browse files Browse the repository at this point in the history
ws change to wss
  • Loading branch information
yeaktas authored Apr 15, 2024
2 parents fb0f242 + 285a3bb commit b200ed7
Show file tree
Hide file tree
Showing 59 changed files with 11,212 additions and 11,212 deletions.
62 changes: 31 additions & 31 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
version: "3.9"

services:
indianpong:
image: aktas/indianpong:latest
build:
context: ./indianpong
container_name: indianpong
restart: always
ports:
- 8000:8000
# depends_on:
# - db
# env_file:
# - .env
# networks:
# - indianpongnet

# db:
# container_name: db
# image: db
# build:
# context: ./
# dockerfile: docker.dockerfile
# restart: always
# networks:
# - indianpongnet
#
#networks:
# indianpongnet:
# driver: bridge
version: "3.9"

services:
indianpong:
image: aktas/indianpong:latest
build:
context: ./indianpong
container_name: indianpong
restart: always
ports:
- 8000:8000
# depends_on:
# - db
# env_file:
# - .env
# networks:
# - indianpongnet

# db:
# container_name: db
# image: db
# build:
# context: ./
# dockerfile: docker.dockerfile
# restart: always
# networks:
# - indianpongnet
#
#networks:
# indianpongnet:
# driver: bridge
30 changes: 15 additions & 15 deletions docker.dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM postgres:13

# Veritabanı adını ve kullanıcı adını ayarla
ENV POSTGRES_DB=pong
ENV POSTGRES_USER=indianpong
ENV POSTGRES_PASSWORD=indianpong123
ENV POSTGRES_HOST_AUTH_METHOD=trust

# Docker imajı oluşturulduğunda çalıştırılacak SQL dosyalarını kopyala

# PostgreSQL'in varsayılan bağlantı noktası
EXPOSE 5432

RUN pg_createcluster 13 main --start
RUN service postgresql start
FROM postgres:13

# Veritabanı adını ve kullanıcı adını ayarla
ENV POSTGRES_DB=pong
ENV POSTGRES_USER=indianpong
ENV POSTGRES_PASSWORD=indianpong123
ENV POSTGRES_HOST_AUTH_METHOD=trust

# Docker imajı oluşturulduğunda çalıştırılacak SQL dosyalarını kopyala

# PostgreSQL'in varsayılan bağlantı noktası
EXPOSE 5432

RUN pg_createcluster 13 main --start
RUN service postgresql start
42 changes: 21 additions & 21 deletions indianpong/pong/apps.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
from django.apps import AppConfig
from django.contrib.auth.signals import user_logged_in, user_logged_out
from django.dispatch import receiver


class PongConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'pong'

""" def ready(self):
@receiver(user_logged_in)
def user_logged_in_handler(sender, request, **kwargs):
request.user.is_online = True
request.user.save()
@receiver(user_logged_out)
def user_logged_out_handler(sender, request, **kwargs):
request.user.is_online = False
request.user.save() """

from django.apps import AppConfig
from django.contrib.auth.signals import user_logged_in, user_logged_out
from django.dispatch import receiver


class PongConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'pong'

""" def ready(self):
@receiver(user_logged_in)
def user_logged_in_handler(sender, request, **kwargs):
request.user.is_online = True
request.user.save()
@receiver(user_logged_out)
def user_logged_out_handler(sender, request, **kwargs):
request.user.is_online = False
request.user.save() """
Loading

0 comments on commit b200ed7

Please sign in to comment.