Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env.prod.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ MINIO_ROOT_PASSWORD=minioadmin
MINIO_BUCKET_NAME=files
MINIO_URL=http://minio:9000

CELERY_BROKER_URL=$CELERY_BROKER_URL
FLOWER_PORT=5555

GF_SECURITY_ADMIN_USER=admin
GF_SECURITY_ADMIN_PASSWORD=grafana

WORKERS_COUNT=2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ backend/media

backend/celerybeat-schedule

prometheus_data

.idea
.env
.env.prod
2 changes: 2 additions & 0 deletions backend/backend/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
app = Celery("backend")

app.config_from_object("django.conf:settings", namespace="CELERY")
app.conf.worker_send_task_events = True
app.worker_send_task_events = True

app.autodiscover_tasks()
4 changes: 3 additions & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ djangorestframework==3.15.2
boto3==1.26.59
django-storages==1.14.4
uuid==1.30
django-celery-beat
django-celery-beat

flower==2.0.1
35 changes: 34 additions & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,41 @@ services:
command: server /data --console-address ":9001"
restart: "on-failure"

flower:
image: mher/flower:latest
ports:
- "5555:5555"
env_file:
- .env.prod
depends_on:
- redis

prometheus:
image: prom/prometheus:latest
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: unless-stopped
volumes:
- ./prometheus:/etc/prometheus
- ./prometheus/prometheus_data:/prometheus

grafana:
build: grafana
container_name: grafana
ports:
- 3000:3000
restart: unless-stopped
env_file:
- .env.prod
depends_on:
- prometheus

volumes:
postgres_data:
minio_data:
static_volume:
media_volume:
media_volume:
prometheus_data:
7 changes: 7 additions & 0 deletions grafana/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM grafana/grafana:latest

RUN ls

COPY ./provisioning/dashboards/*.yml /etc/grafana/provisioning/dashboards/
COPY ./provisioning/datasources/*.yml /etc/grafana/provisioning/datasources/
COPY ./provisioning/dashboards/*.json /var/lib/grafana/dashboards/
Loading