feat: added profiles to compose

This commit is contained in:
ITQ
2025-05-08 18:02:22 +03:00
parent 8fee526ba7
commit 5fd546ba5c
2 changed files with 31 additions and 18 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ deploy:
cd ~/deploy
docker compose pull --policy always -q > deploy.log 2>&1
docker compose up -d --remove-orphans --force-recreate >> deploy.log 2>&1
docker compose --profile celery --profile docs up -d --remove-orphans --force-recreate >> deploy.log 2>&1
docker compose ps >> deploy.log 2>&1
nohup docker system prune -a --force >> deploy.log 2>&1 &
+23 -10
View File
@@ -90,7 +90,7 @@ services:
image: registry.gitlab.com/megazordpobeda/datarush/backend:${VERSION:-latest}
build:
context: ./services/backend
command: celery -A config worker -l INFO
command: [ "celery", "-A", "config", "worker", "-l", "INFO" ]
depends_on:
redis:
restart: false
@@ -104,10 +104,12 @@ services:
healthcheck:
test: [ "CMD", "celery", "-A", "config", "inspect", "ping" ]
interval: 30s
timeout: 10s
timeout: 30s
retries: 3
start_period: 10s
start_interval: 2s
profiles:
- celery
restart: unless-stopped
celery-exporter:
@@ -122,6 +124,8 @@ services:
required: true
- path: ./infrastructure/celery-exporter/.env
required: false
profiles:
- monitoring
restart: unless-stopped
frontend:
@@ -131,13 +135,6 @@ services:
required: true
- path: ./infrastructure/frontend/.env
required: false
healthcheck:
test: ["CMD", "service", "nginx", "status", "||", " exit 1"]
interval: 1m30s
timeout: 5s
start_period: 5s
start_interval: 2s
retries: 5
ports:
- name: web
target: 80
@@ -184,6 +181,8 @@ services:
required: true
- path: ./infrastructure/redis-exporter/.env
required: false
profiles:
- monitoring
restart: unless-stopped
shm_size: 4mb
@@ -198,7 +197,7 @@ services:
- path: ./infrastructure/postgres/.env
required: false
healthcheck:
test: ["CMD", "pg_isready"]
test: [ "CMD", "pg_isready", "--dbname=$POSTGRES_DB" ]
interval: 1m30s
timeout: 5s
start_period: 5s
@@ -224,6 +223,8 @@ services:
required: true
- path: ./infrastructure/postgres-exporter/.env
required: false
profiles:
- monitoring
restart: unless-stopped
shm_size: 4mb
@@ -256,6 +257,8 @@ services:
host_ip: 127.0.0.1
protocol: tcp
app_protocol: http
profiles:
- administrative
restart: unless-stopped
secrets:
- source: pgadmin_password
@@ -289,6 +292,8 @@ services:
host_ip: 127.0.0.1
protocol: tcp
app_protocol: http
profiles:
- monitoring
restart: unless-stopped
shm_size: 4mb
volumes:
@@ -357,6 +362,8 @@ services:
host_ip: 127.0.0.1
protocol: tcp
app_protocol: http
profiles:
- monitoring
restart: unless-stopped
shm_size: 4mb
volumes:
@@ -376,11 +383,15 @@ services:
host_ip: 127.0.0.1
protocol: tcp
app_protocol: http
profiles:
- docs
restart: unless-stopped
shm_size: 4mb
custom_python:
image: registry.gitlab.com/megazordpobeda/datarush/custom-python:${VERSION:-latest}
profiles:
- celery
checker:
image: registry.gitlab.com/megazordpobeda/datarush/checker:${VERSION:-latest}
@@ -404,6 +415,8 @@ services:
host_ip: 127.0.0.1
protocol: tcp
app_protocol: http
profiles:
- celery
restart: unless-stopped
volumes:
- type: bind