mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Cleaned up some comments
This commit is contained in:
parent
0eed736dd7
commit
c57a6bd499
3 changed files with 23 additions and 4 deletions
22
docker-compose.yml
Normal file
22
docker-compose.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
version: '3.9'
|
||||||
|
|
||||||
|
services:
|
||||||
|
# Python app service
|
||||||
|
python_app:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: stude_backend:latest
|
||||||
|
ports:
|
||||||
|
- "8000:8000" # Expose port 8000 for the web server
|
||||||
|
depends_on:
|
||||||
|
- redis_server # Ensure the Redis server starts before the Python app
|
||||||
|
environment:
|
||||||
|
- PYTHONBUFFERED=1
|
||||||
|
command: ["python", "stude/manage.py", "runserver"]
|
||||||
|
|
||||||
|
# Redis server service
|
||||||
|
redis_server:
|
||||||
|
image: redis:latest
|
||||||
|
ports:
|
||||||
|
- "6379:6379" # Expose default Redis port
|
|
@ -13,7 +13,6 @@ django_asgi_app = get_asgi_application()
|
||||||
|
|
||||||
application = ProtocolTypeRouter({
|
application = ProtocolTypeRouter({
|
||||||
"http": django_asgi_app,
|
"http": django_asgi_app,
|
||||||
# Just HTTP for now. (We can add other protocols later.)
|
|
||||||
'websocket': AuthMiddlewareStack(
|
'websocket': AuthMiddlewareStack(
|
||||||
URLRouter(
|
URLRouter(
|
||||||
[re_path(r'ws/', URLRouter(api.routing.websocket_urlpatterns))]
|
[re_path(r'ws/', URLRouter(api.routing.websocket_urlpatterns))]
|
||||||
|
|
|
@ -66,7 +66,7 @@ else:
|
||||||
EMAIL_PORT = str(os.getenv('PROD_EMAIL_PORT'))
|
EMAIL_PORT = str(os.getenv('PROD_EMAIL_PORT'))
|
||||||
EMAIL_USE_TLS = str(os.getenv('PROD_EMAIL_TLS'))
|
EMAIL_USE_TLS = str(os.getenv('PROD_EMAIL_TLS'))
|
||||||
|
|
||||||
# Will need to install OSGeo4W for this!
|
# GDAL Library needed for Windows
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
VIRTUAL_ENV_BASE = os.environ['VIRTUAL_ENV']
|
VIRTUAL_ENV_BASE = os.environ['VIRTUAL_ENV']
|
||||||
os.environ['PATH'] = os.path.join(
|
os.environ['PATH'] = os.path.join(
|
||||||
|
@ -74,8 +74,6 @@ if os.name == 'nt':
|
||||||
os.environ['PROJ_LIB'] = os.path.join(
|
os.environ['PROJ_LIB'] = os.path.join(
|
||||||
VIRTUAL_ENV_BASE, r'.\Lib\site-packages\osgeo\data\proj') + ';' + os.environ['PATH']
|
VIRTUAL_ENV_BASE, r'.\Lib\site-packages\osgeo\data\proj') + ';' + os.environ['PATH']
|
||||||
|
|
||||||
# To-do: Linux GDAL support here
|
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'daphne',
|
'daphne',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
|
|
Loading…
Reference in a new issue