-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
59 changed files
with
11,212 additions
and
11,212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() """ | ||
Oops, something went wrong.