Skip to content

Commit

Permalink
Merge pull request #418 from bounswe/backend
Browse files Browse the repository at this point in the history
Backend: Milestone 3 Developments
  • Loading branch information
sonerkuyar authored Dec 16, 2024
2 parents 9b7e576 + ba9f175 commit 15155b1
Show file tree
Hide file tree
Showing 43 changed files with 4,100 additions and 49 deletions.
8 changes: 7 additions & 1 deletion app/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /app

COPY . /app


# dependencies
RUN pip install --upgrade pip
RUN pip install django mysqlclient
Expand All @@ -13,10 +14,15 @@ RUN pip install setuptools
RUN pip install Pillow
RUN pip install django-cors-headers
RUN pip install requests
RUN pip install chess



# port
EXPOSE 8000

# Default commands to run the server
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh

CMD ["/app/start.sh"]
4 changes: 4 additions & 0 deletions app/backend/api_core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
'v1.apps.accounts',
'v1.apps.posts',
'v1.apps.games',
'v1.apps.puzzle',

]

Expand Down Expand Up @@ -138,6 +139,9 @@
# Absolute path where collected static files will be stored.
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')




# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

Expand Down
2 changes: 1 addition & 1 deletion app/backend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:

web:
build: .
command: python manage.py runserver 0.0.0.0:8000 # Start Django development server
command: /app/start.sh # Start Django development server
volumes:
- .:/app # Mount current directory to /app in the container
- media_data:/app/media # Persist media files in a Docker volume
Expand Down
Loading

0 comments on commit 15155b1

Please sign in to comment.