-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from swsnu/release/1.2
Release/1.2
- Loading branch information
Showing
180 changed files
with
12,098 additions
and
3,904 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
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,36 +1,42 @@ | ||
# FITogether | ||
[![Build Status](https://app.travis-ci.com/swsnu/swppfall2022-team4.svg?branch=main)](https://app.travis-ci.com/swsnu/swppfall2022-team4) | ||
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=swsnu_swppfall2022-team4&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=swsnu_swppfall2022-team4) | ||
[![Coverage Status](https://coveralls.io/repos/github/swsnu/swppfall2022-team4/badge.svg?branch=main&kill_cache=1)](https://coveralls.io/github/swsnu/swppfall2022-team4?branch=main) | ||
[![Coverage Status](https://coveralls.io/repos/github/swsnu/swppfall2022-team4/badge.svg?branch=main&kill_cache=1)](https://coveralls.io/github/swsnu/swppfall2022-team4?branch=main) | ||
|
||
https://fitogether.site/ | ||
|
||
## Locally Install | ||
_**Note**: We implemented the Kakao social login feature, but this feature only works with local environment (localost:3000) due to the redirect URL problem. Also, it may not work with local environment in the future because HTTPS deployment will be done in the Sprint 5._ | ||
### Run frontend server | ||
# node.js : v16.18.1 | ||
# Rename frontend/example.env to frontend/.env | ||
|
||
cd frontend | ||
yarn install | ||
yarn start | ||
### Test frontend | ||
yarn test --coverage --watchAll=false | ||
### Run backend server | ||
# python : v3.9.5 | ||
# Rename backend/example.env to backend/.env | ||
# redis-server should be running in the background to chat. | ||
|
||
cd backend | ||
pip install -r requirements.txt | ||
python manage.py migrate | ||
python manage.py runserver 0.0.0.0:8000 | ||
### Websocket setting | ||
# redis-server should be running in the background. | ||
|
||
cd backend | ||
daphne -b 0.0.0.0 -p 8001 FITogether.asgi:application | ||
|
||
## Testing | ||
### Test frontend | ||
cd frontend | ||
yarn test --coverage --watchAll=false | ||
### Test backend | ||
cd backend | ||
coverage run --source='.' manage.py test | ||
coverage report | ||
------------------ | ||
## Docker | ||
### Nginx (front + back) | ||
docker-compose up | ||
# If you want to rebuild, please type docker-compose up --build | ||
- After docker-compose, type just ```http://localhost/``` in any browser | ||
- You can access an account that already has chat dummy data created. Username is "testuser" and password is "password". | ||
- Happy with _FITogether_! | ||
## Create Dummy Data | ||
cd backend | ||
python manage.py seed_users -n 10 | ||
... | ||
You can find commands to add dummy data at [here](https://github.com/swsnu/swppfall2022-team4/wiki). |
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,3 +1,3 @@ | ||
[MASTER] | ||
disable=C0114, C0115, C0116, C0301, C0411, W0105, W0221, W0201, W0611, W0703, R0903, R0911, R0914, R0915, R1705, R1710, E5110, E1101, R0801, R0912 | ||
disable=C0103, C0114, C0115, C0116, C0301, C0411, C0412, W0105, W0221, W0201, W0611, W0703, R0903, R0911, R0914, R0915, R1705, R1710, E5110, E1101, R0801, R0912 | ||
ignore-paths=.*/migrations/*, manage.py, .*/management/commands/* |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM python:3.9.5 | ||
|
||
VOLUME /app | ||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
# ENV is not uploaded on Github. | ||
|
||
RUN pip install -r requirements.txt | ||
RUN pip install uwsgi | ||
RUN pip install mysql-connector-python==8.0.26 |
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,29 +1,9 @@ | ||
""" | ||
ASGI config for FITogether project. | ||
It exposes the ASGI callable as a module-level variable named ``application``. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/ | ||
""" | ||
|
||
import os | ||
import chats.routing | ||
from channels.auth import AuthMiddlewareStack | ||
from channels.routing import ProtocolTypeRouter, URLRouter | ||
from channels.security.websocket import AllowedHostsOriginValidator | ||
from django.core.asgi import get_asgi_application | ||
import django | ||
from channels.routing import get_default_application | ||
|
||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'FITogether.settings') | ||
|
||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") | ||
# Initialize Django ASGI application early to ensure the AppRegistry | ||
# is populated before importing code that may import ORM models. | ||
django_asgi_app = get_asgi_application() | ||
django.setup() | ||
|
||
application = ProtocolTypeRouter( | ||
{ | ||
"http": django_asgi_app, | ||
"websocket": AllowedHostsOriginValidator( | ||
AuthMiddlewareStack(URLRouter(chats.routing.websocket_urlpatterns)) | ||
), | ||
} | ||
) | ||
application = get_default_application() |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from channels.auth import AuthMiddlewareStack | ||
from channels.routing import ProtocolTypeRouter, URLRouter | ||
import chats.routing | ||
|
||
application = ProtocolTypeRouter({ | ||
'websocket': AuthMiddlewareStack( | ||
URLRouter( | ||
chats.routing.websocket_urlpatterns | ||
) | ||
), | ||
}) |
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
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
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
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
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
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
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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,4 +1,9 @@ | ||
from django.contrib import admin | ||
from .models import Group | ||
from groups.models import Group | ||
|
||
admin.site.register(Group) | ||
|
||
@admin.register(Group) | ||
class GroupAdmin(admin.ModelAdmin): | ||
"""Group admin definition""" | ||
|
||
list_display = ("pk", "group_name", "group_leader", "address") |
Empty file.
Empty file.
Oops, something went wrong.