mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 23:17:09 +00:00
Merge remote-tracking branch 'origin/master' into feature/tasks
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ deploy:
|
||||
- AUTH_COMMAND="echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin";
|
||||
- ssh $SSH_ADDRESS "$AUTH_COMMAND"
|
||||
- scp -C -r infrastructure/ compose.yaml $SSH_ADDRESS:~/deploy/
|
||||
|
||||
- ssh $SSH_ADDRESS "docker -v"
|
||||
- ssh $SSH_ADDRESS "cd ~/deploy && \
|
||||
docker compose pull > deploy.log 2>&1 && \
|
||||
docker compose down >> deploy.log 2>&1 && \
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
name: project_name
|
||||
name: datarush
|
||||
|
||||
services:
|
||||
backend:
|
||||
|
||||
@@ -20,7 +20,7 @@ MINIO_CUSTOM_ENDPOINT_URL=
|
||||
MINIO_ACCESS_KEY=
|
||||
MINIO_SECRET_KEY=
|
||||
MINIO_USE_HTTPS=False
|
||||
MINIO_MEDIA_BUCKET_NAME=projectname-media
|
||||
MINIO_MEDIA_BUCKET_NAME=datarush-media
|
||||
|
||||
|
||||
# Applyable if you installing using docker compose
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
# project_name Backend
|
||||
# DataRush Backend
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -15,13 +15,13 @@ Ensure you have the following installed on your system:
|
||||
#### Clone the project
|
||||
|
||||
```bash
|
||||
git clone project_name
|
||||
git clone git@gitlab.prodcontest.ru:team-15/project.git
|
||||
```
|
||||
|
||||
#### Go to the project directory
|
||||
|
||||
```bash
|
||||
cd project_name/services/backend
|
||||
cd project/services/backend
|
||||
```
|
||||
|
||||
#### Customize environment
|
||||
@@ -79,19 +79,19 @@ uv run gunicorn config.wsgi
|
||||
### Clone the project
|
||||
|
||||
```bash
|
||||
git clone project_name
|
||||
git clone git@gitlab.prodcontest.ru:team-15/project.git
|
||||
```
|
||||
|
||||
### Go to the project directory
|
||||
|
||||
```bash
|
||||
cd project_name/services/backend
|
||||
cd project/services/backend
|
||||
```
|
||||
|
||||
### Build docker image
|
||||
|
||||
```bash
|
||||
docker build -t project_name-backend .
|
||||
docker build -t datarush-backend .
|
||||
```
|
||||
|
||||
### Customize environment
|
||||
@@ -103,13 +103,13 @@ Customize environment with `docker run` command (or bind .env file to container)
|
||||
#### Backend
|
||||
|
||||
```bash
|
||||
docker run -p 8080:8080 --name project_name-backend project_name-backend
|
||||
docker run -p 8080:8080 --name datarush-backend datarush-backend
|
||||
```
|
||||
|
||||
#### Celery worker
|
||||
|
||||
```bash
|
||||
docker run --name project_name-celery-worker project_name-backend celery -A config worker -l INFO
|
||||
docker run --name datarush-celery-worker datarush-backend celery -A config worker -l INFO
|
||||
```
|
||||
|
||||
Backend will be available on [127.0.0.1:8080](http://127.0.0.1:8080).
|
||||
@@ -119,13 +119,13 @@ Backend will be available on [127.0.0.1:8080](http://127.0.0.1:8080).
|
||||
### Clone the project
|
||||
|
||||
```bash
|
||||
git clone project_name
|
||||
git clone git@gitlab.prodcontest.ru:team-15/project.git
|
||||
```
|
||||
|
||||
### Go to the project directory
|
||||
|
||||
```bash
|
||||
cd project_name/services/backend
|
||||
cd project/services/backend
|
||||
```
|
||||
|
||||
### Install dependencies
|
||||
|
||||
@@ -6,5 +6,5 @@ from api.v1.router import router as api_v1_router
|
||||
urlpatterns = [
|
||||
path("api/v1/", api_v1_router.urls),
|
||||
# Health endpoint
|
||||
path("health", MainView.as_view(), name="health_check_home"),
|
||||
path("api/health", MainView.as_view(), name="health_check_home"),
|
||||
]
|
||||
|
||||
@@ -14,7 +14,6 @@ router = NinjaAPI(
|
||||
version="1",
|
||||
description="API docs for DataRush",
|
||||
openapi_url="/docs/openapi.json",
|
||||
auth=BearerAuth(),
|
||||
)
|
||||
|
||||
|
||||
@@ -25,10 +24,12 @@ router.add_router(
|
||||
router.add_router(
|
||||
"",
|
||||
user_router,
|
||||
auth=BearerAuth(),
|
||||
)
|
||||
router.add_router(
|
||||
"",
|
||||
competition_router,
|
||||
auth=BearerAuth(),
|
||||
)
|
||||
router.add_router(
|
||||
"",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""ASGI config for project_name."""
|
||||
"""ASGI config for datarush."""
|
||||
|
||||
import os
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from celery import Celery
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
|
||||
|
||||
app = Celery("project_name")
|
||||
app = Celery("datarush")
|
||||
|
||||
app.config_from_object("django.conf:settings", namespace="CELERY")
|
||||
app.autodiscover_tasks()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Django settings for project_name."""
|
||||
"""Django settings for datarush."""
|
||||
|
||||
import contextlib
|
||||
import logging
|
||||
@@ -141,7 +141,7 @@ MINIO_STORAGE_SECRET_KEY = env("MINIO_SECRET_KEY", default=None)
|
||||
MINIO_STORAGE_USE_HTTPS = env("MINIO_USE_HTTPS", default=False)
|
||||
|
||||
MINIO_STORAGE_MEDIA_BUCKET_NAME = env(
|
||||
"MINIO_MEDIA_BUCKET_NAME", default="projectname-media"
|
||||
"MINIO_MEDIA_BUCKET_NAME", default="datarush-media"
|
||||
)
|
||||
|
||||
MINIO_STORAGE_AUTO_CREATE_MEDIA_BUCKET = True
|
||||
@@ -300,7 +300,7 @@ WSGI_APPLICATION = "config.wsgi.application"
|
||||
|
||||
# Logging
|
||||
|
||||
LOGGER_NAME = "project_name"
|
||||
LOGGER_NAME = "datarush"
|
||||
|
||||
LOGGER = logging.getLogger(LOGGER_NAME)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""URL configuration for project_name."""
|
||||
"""URL configuration for datarush."""
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
@@ -6,9 +6,9 @@ from django.urls import include, path
|
||||
|
||||
from config import handlers
|
||||
|
||||
admin.site.site_title = "project_name"
|
||||
admin.site.site_header = "project_name"
|
||||
admin.site.index_title = "project_name"
|
||||
admin.site.site_title = "DataRush"
|
||||
admin.site.site_header = "DataRush"
|
||||
admin.site.index_title = "DataRush"
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""WSGI config for project_name."""
|
||||
"""WSGI config for datarush."""
|
||||
|
||||
import os
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[project]
|
||||
name = "project_name-backend"
|
||||
name = "datarush-backend"
|
||||
version = "0.1.0"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10,<3.12"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# project_name Tests
|
||||
# DataRush Tests
|
||||
|
||||
There is `unit` and `e2e` tests available, unit tests are placed all around `backend` serivce folder and `e2e` tests placed [here](./e2e/).
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# E2E tests for project_name
|
||||
# E2E tests for DataRush
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def docker_compose() -> Generator[None]:
|
||||
"docker",
|
||||
"compose",
|
||||
"--project-name",
|
||||
"project_name",
|
||||
"datarush-testing",
|
||||
"up",
|
||||
"-d",
|
||||
"--build",
|
||||
@@ -49,7 +49,7 @@ def docker_compose() -> Generator[None]:
|
||||
"docker",
|
||||
"compose",
|
||||
"--project-name",
|
||||
"project_name",
|
||||
"datarush-testing",
|
||||
"down",
|
||||
"-v",
|
||||
],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[project]
|
||||
name = "project_name-e2e-tests"
|
||||
name = "datarush-e2e-tests"
|
||||
version = "0.1.0"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10,<3.12"
|
||||
|
||||
Reference in New Issue
Block a user