mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 23:17:09 +00:00
datarushpobeda
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
name: project_name
|
name: datarush
|
||||||
|
|
||||||
services:
|
services:
|
||||||
backend:
|
backend:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ MINIO_CUSTOM_ENDPOINT_URL=
|
|||||||
MINIO_ACCESS_KEY=
|
MINIO_ACCESS_KEY=
|
||||||
MINIO_SECRET_KEY=
|
MINIO_SECRET_KEY=
|
||||||
MINIO_USE_HTTPS=False
|
MINIO_USE_HTTPS=False
|
||||||
MINIO_MEDIA_BUCKET_NAME=projectname-media
|
MINIO_MEDIA_BUCKET_NAME=datarush-media
|
||||||
|
|
||||||
|
|
||||||
# Applyable if you installing using docker compose
|
# Applyable if you installing using docker compose
|
||||||
|
|||||||
+10
-10
@@ -1,4 +1,4 @@
|
|||||||
# project_name Backend
|
# DataRush Backend
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@@ -15,13 +15,13 @@ Ensure you have the following installed on your system:
|
|||||||
#### Clone the project
|
#### Clone the project
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone project_name
|
git clone git@gitlab.prodcontest.ru:team-15/project.git
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Go to the project directory
|
#### Go to the project directory
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd project_name/services/backend
|
cd project/services/backend
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Customize environment
|
#### Customize environment
|
||||||
@@ -79,19 +79,19 @@ uv run gunicorn config.wsgi
|
|||||||
### Clone the project
|
### Clone the project
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone project_name
|
git clone git@gitlab.prodcontest.ru:team-15/project.git
|
||||||
```
|
```
|
||||||
|
|
||||||
### Go to the project directory
|
### Go to the project directory
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd project_name/services/backend
|
cd project/services/backend
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build docker image
|
### Build docker image
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -t project_name-backend .
|
docker build -t datarush-backend .
|
||||||
```
|
```
|
||||||
|
|
||||||
### Customize environment
|
### Customize environment
|
||||||
@@ -103,13 +103,13 @@ Customize environment with `docker run` command (or bind .env file to container)
|
|||||||
#### Backend
|
#### Backend
|
||||||
|
|
||||||
```bash
|
```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
|
#### Celery worker
|
||||||
|
|
||||||
```bash
|
```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).
|
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
|
### Clone the project
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone project_name
|
git clone git@gitlab.prodcontest.ru:team-15/project.git
|
||||||
```
|
```
|
||||||
|
|
||||||
### Go to the project directory
|
### Go to the project directory
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd project_name/services/backend
|
cd project/services/backend
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install dependencies
|
### Install dependencies
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""ASGI config for project_name."""
|
"""ASGI config for datarush."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from celery import Celery
|
|||||||
|
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
|
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.config_from_object("django.conf:settings", namespace="CELERY")
|
||||||
app.autodiscover_tasks()
|
app.autodiscover_tasks()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""Django settings for project_name."""
|
"""Django settings for datarush."""
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import logging
|
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_USE_HTTPS = env("MINIO_USE_HTTPS", default=False)
|
||||||
|
|
||||||
MINIO_STORAGE_MEDIA_BUCKET_NAME = env(
|
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
|
MINIO_STORAGE_AUTO_CREATE_MEDIA_BUCKET = True
|
||||||
@@ -300,7 +300,7 @@ WSGI_APPLICATION = "config.wsgi.application"
|
|||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
||||||
LOGGER_NAME = "project_name"
|
LOGGER_NAME = "datarush"
|
||||||
|
|
||||||
LOGGER = logging.getLogger(LOGGER_NAME)
|
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.conf import settings
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
@@ -6,9 +6,9 @@ from django.urls import include, path
|
|||||||
|
|
||||||
from config import handlers
|
from config import handlers
|
||||||
|
|
||||||
admin.site.site_title = "project_name"
|
admin.site.site_title = "DataRush"
|
||||||
admin.site.site_header = "project_name"
|
admin.site.site_header = "DataRush"
|
||||||
admin.site.index_title = "project_name"
|
admin.site.index_title = "DataRush"
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""WSGI config for project_name."""
|
"""WSGI config for datarush."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "project_name-backend"
|
name = "datarush-backend"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10,<3.12"
|
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/).
|
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
|
## Prerequisites
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ def docker_compose() -> Generator[None]:
|
|||||||
"docker",
|
"docker",
|
||||||
"compose",
|
"compose",
|
||||||
"--project-name",
|
"--project-name",
|
||||||
"project_name",
|
"datarush-testing",
|
||||||
"up",
|
"up",
|
||||||
"-d",
|
"-d",
|
||||||
"--build",
|
"--build",
|
||||||
@@ -49,7 +49,7 @@ def docker_compose() -> Generator[None]:
|
|||||||
"docker",
|
"docker",
|
||||||
"compose",
|
"compose",
|
||||||
"--project-name",
|
"--project-name",
|
||||||
"project_name",
|
"datarush-testing",
|
||||||
"down",
|
"down",
|
||||||
"-v",
|
"-v",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "project_name-e2e-tests"
|
name = "datarush-e2e-tests"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10,<3.12"
|
requires-python = ">=3.10,<3.12"
|
||||||
|
|||||||
Reference in New Issue
Block a user