2025-11-24 21:04:50 +07:00
|
|
|
version: '3.9'
|
2025-11-23 23:25:58 +07:00
|
|
|
|
|
|
|
|
services:
|
2025-12-23 16:05:51 +07:00
|
|
|
storage:
|
|
|
|
|
image: alpine:latest
|
|
|
|
|
container_name: file-storage
|
2026-01-20 03:47:51 +07:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
memory: 128M
|
|
|
|
|
reservations:
|
|
|
|
|
memory: 64M
|
2025-12-23 16:05:51 +07:00
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
volumes:
|
|
|
|
|
- uploads_data:/storage:rw
|
|
|
|
|
command: tail -f /dev/null
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
2026-01-20 03:47:51 +07:00
|
|
|
# postfix:
|
|
|
|
|
# image: boky/postfix:latest
|
|
|
|
|
# container_name: postfix-production
|
|
|
|
|
# hostname: ${DOMAIN:-no-copy.ru}
|
|
|
|
|
# environment:
|
|
|
|
|
# - DOMAIN=${DOMAIN:-no-copy.ru}
|
|
|
|
|
# - ALLOWED_SENDER_DOMAINS=*
|
|
|
|
|
# - RELAYHOST=
|
|
|
|
|
# - DISABLE_SMTP_AUTH=
|
|
|
|
|
# - SMTP_USERNAME=${MAIL_USERNAME:-noreply@no-copy.ru}
|
|
|
|
|
# - SMTP_PASSWORD=${SMTP_PASSWORD:-nocopy!nocopy!}
|
|
|
|
|
# - RELAY_NETWORKS=172.16.0.0/12
|
|
|
|
|
# - POSTFIX_mynetworks=127.0.0.0/8 172.17.0.0/16 172.16.0.0/12
|
|
|
|
|
# - POSTFIX_smtpd_relay_restrictions=permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
|
|
|
|
|
# - POSTFIX_smtpd_recipient_restrictions=permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
|
|
|
|
|
# - DISABLE_SIGNING=true
|
|
|
|
|
# ports:
|
|
|
|
|
# - "25:25"
|
|
|
|
|
# - "587:587"
|
|
|
|
|
# networks:
|
|
|
|
|
# - app-network
|
|
|
|
|
# restart: unless-stopped
|
|
|
|
|
|
2025-11-24 21:04:50 +07:00
|
|
|
db:
|
2026-01-15 16:17:03 +07:00
|
|
|
image: postgres:17.7
|
2026-01-20 03:47:51 +07:00
|
|
|
restart: always
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '2.0'
|
|
|
|
|
memory: 2G
|
|
|
|
|
reservations:
|
|
|
|
|
cpus: '1.0'
|
|
|
|
|
memory: 1G
|
2025-11-23 23:25:58 +07:00
|
|
|
environment:
|
2025-11-24 22:39:08 +07:00
|
|
|
POSTGRES_DB: no_copy_
|
2026-01-20 03:47:51 +07:00
|
|
|
# POSTGRES_USER: postgres
|
|
|
|
|
# POSTGRES_PASSWORD: postgres
|
2026-01-15 16:17:03 +07:00
|
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
2025-12-30 12:08:23 +07:00
|
|
|
POSTGRES_SHARED_BUFFERS: 512MB
|
|
|
|
|
POSTGRES_EFFECTIVE_CACHE_SIZE: 1536MB
|
2025-11-23 23:25:58 +07:00
|
|
|
ports:
|
2025-11-24 22:39:08 +07:00
|
|
|
- "54320:5432"
|
2025-11-23 23:25:58 +07:00
|
|
|
volumes:
|
2025-11-24 21:04:50 +07:00
|
|
|
- pgdata:/var/lib/postgresql/data
|
2026-01-15 16:17:03 +07:00
|
|
|
- ./init-scripts:/docker-entrypoint-initdb.d:ro
|
2026-01-20 03:47:51 +07:00
|
|
|
container_name: postgres
|
2025-12-03 16:56:49 +07:00
|
|
|
networks:
|
2025-12-04 10:50:26 +07:00
|
|
|
app-network:
|
|
|
|
|
aliases:
|
|
|
|
|
- database
|
2025-11-23 23:25:58 +07:00
|
|
|
|
2025-11-24 21:04:50 +07:00
|
|
|
app:
|
2025-12-03 16:56:49 +07:00
|
|
|
build: .
|
2025-12-04 10:50:26 +07:00
|
|
|
container_name: app-backend
|
2026-01-20 03:47:51 +07:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '1.5'
|
2026-01-25 21:10:17 +07:00
|
|
|
memory: 3G
|
2026-01-20 03:47:51 +07:00
|
|
|
reservations:
|
|
|
|
|
cpus: '0.5'
|
2026-01-25 21:10:17 +07:00
|
|
|
memory: 2G
|
2025-11-24 21:04:50 +07:00
|
|
|
environment:
|
2026-01-25 21:10:17 +07:00
|
|
|
JAVA_TOOL_OPTIONS: "-Xmx2g -Xms1g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -XX:+UseContainerSupport -XX:InitialRAMPercentage=50 -XX:MaxRAMPercentage=75"
|
2025-12-16 03:44:59 +07:00
|
|
|
FILE_STORAGE_PATH: /data/uploads
|
2025-12-25 13:04:49 +07:00
|
|
|
MAX_FILE_SIZE: 10737418240
|
2026-01-20 03:47:51 +07:00
|
|
|
# FILE_CHUNK_SIZE: 1048576
|
2026-01-08 12:59:30 +07:00
|
|
|
FILE_CHUNK_SIZE: 1000000
|
2025-11-24 22:39:08 +07:00
|
|
|
POSTGRES_DB: no_copy_
|
2026-01-27 20:27:39 +07:00
|
|
|
|
2026-01-15 16:17:03 +07:00
|
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
2025-11-24 21:04:50 +07:00
|
|
|
POSTGRES_PORT: 5432
|
2025-11-24 22:39:08 +07:00
|
|
|
POSTGRES_HOST: db
|
2025-12-23 16:05:51 +07:00
|
|
|
STORAGE_SERVICE_URL: http://storage:8081
|
2026-01-27 20:27:39 +07:00
|
|
|
SPRING_PROFILES_ACTIVE: prod
|
2026-01-20 03:47:51 +07:00
|
|
|
YANDEX_API_KEY: AQVNyaVaUmgUb1GMCtf5zSEqFxy0woXrcMOOB43q
|
|
|
|
|
YANDEX_FOLDER_ID: b1gokpdbm6qfpsou8pcd
|
|
|
|
|
YANDEX_SEARCH_URL: "https://searchapi.api.cloud.yandex.net/v2/image/search_by_image"
|
2026-01-27 20:27:39 +07:00
|
|
|
# POSTGRES_USER: postgres
|
|
|
|
|
# POSTGRES_PASSWORD: postgres
|
2026-01-20 03:47:51 +07:00
|
|
|
# MAIL_HOST: postfix
|
|
|
|
|
# MAIL_PORT: 25
|
|
|
|
|
# MAIL_USERNAME: noreply@no-copy.ru
|
|
|
|
|
# SMTP_PASSWORD: nocopy!nocopy!
|
|
|
|
|
# SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE: "false"
|
|
|
|
|
# SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH: "false"
|
|
|
|
|
# SPRING_MAIL_PROPERTIES_MAIL_DEBUG: "true"
|
2025-11-24 21:04:50 +07:00
|
|
|
depends_on:
|
2025-11-24 22:39:08 +07:00
|
|
|
- db
|
2025-11-23 23:25:58 +07:00
|
|
|
ports:
|
2025-12-04 14:15:50 +07:00
|
|
|
- "80:8080"
|
2025-12-03 16:56:49 +07:00
|
|
|
networks:
|
2025-12-04 10:50:26 +07:00
|
|
|
app-network:
|
|
|
|
|
aliases:
|
|
|
|
|
- app
|
|
|
|
|
- backend
|
|
|
|
|
- api
|
2025-12-15 19:49:09 +07:00
|
|
|
volumes:
|
2025-12-23 16:05:51 +07:00
|
|
|
- uploads_data:/data/uploads:rw
|
2026-01-15 16:17:03 +07:00
|
|
|
healthcheck:
|
2026-01-20 03:47:51 +07:00
|
|
|
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d no_copy_" ]
|
2026-01-15 16:17:03 +07:00
|
|
|
interval: 10s
|
|
|
|
|
retries: 5
|
2026-01-20 03:47:51 +07:00
|
|
|
|
|
|
|
|
grafana:
|
|
|
|
|
image: grafana/grafana:10.3.1
|
|
|
|
|
container_name: grafana
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '0.5'
|
|
|
|
|
memory: 512M
|
|
|
|
|
reservations:
|
|
|
|
|
memory: 256M
|
|
|
|
|
ports:
|
|
|
|
|
- "3000:3000"
|
|
|
|
|
depends_on:
|
|
|
|
|
prometheus:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
loki:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
tempo:
|
|
|
|
|
condition: service_started
|
|
|
|
|
alloy:
|
|
|
|
|
condition: service_started
|
|
|
|
|
environment:
|
|
|
|
|
GF_AUTH_ANONYMOUS_ENABLED: "true"
|
|
|
|
|
GF_SECURITY_ADMIN_USER: admin
|
|
|
|
|
GF_SECURITY_ADMIN_PASSWORD: admin
|
|
|
|
|
GF_METRICS_ENABLED: "true"
|
|
|
|
|
GF_DATABASE_MAX_IDLE_CONN: "2"
|
|
|
|
|
GF_DATABASE_MAX_OPEN_CONN: "10"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./infrastructure/grafana/provisioning:/etc/grafana/provisioning
|
|
|
|
|
- ./infrastructure/grafana/dashboards:/var/lib/grafana/dashboards
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD", "wget", "--spider", "http://localhost:3000/api/health" ]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 10
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
|
|
|
|
prometheus:
|
|
|
|
|
image: prom/prometheus:latest
|
|
|
|
|
container_name: prometheus
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '0.5'
|
|
|
|
|
memory: 1G
|
|
|
|
|
reservations:
|
|
|
|
|
memory: 512M
|
|
|
|
|
ports:
|
|
|
|
|
- "9090:9090"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./infrastructure/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
|
|
|
- prometheus_data:/prometheus
|
|
|
|
|
command:
|
|
|
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
|
|
|
- '--storage.tsdb.path=/prometheus'
|
2026-02-10 12:16:31 +07:00
|
|
|
- '--storage.tsdb.retention.time=15d'
|
2026-01-20 03:47:51 +07:00
|
|
|
- '--web.enable-lifecycle'
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD", "wget", "--spider", "http://localhost:9090/-/healthy" ]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
|
|
|
|
loki:
|
|
|
|
|
image: grafana/loki:2.9.2
|
|
|
|
|
container_name: loki
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '1.0'
|
|
|
|
|
memory: 2G
|
|
|
|
|
reservations:
|
|
|
|
|
memory: 1G
|
|
|
|
|
ports:
|
|
|
|
|
- "3100:3100"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./infrastructure/loki/loki-config.yaml:/etc/loki/loki-config.yaml:ro
|
|
|
|
|
- loki_data:/loki
|
|
|
|
|
command:
|
|
|
|
|
- -config.file=/etc/loki/loki-config.yaml
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:3100/ready" ]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
2026-04-14 17:32:43 +07:00
|
|
|
mongodb:
|
|
|
|
|
image: mongo:latest
|
|
|
|
|
container_name: mongo_ncp
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
ports:
|
|
|
|
|
- "27017:27017"
|
|
|
|
|
environment:
|
|
|
|
|
MONGO_INITDB_ROOT_USERNAME: mongo_db
|
|
|
|
|
MONGO_INITDB_ROOT_PASSWORD: mongo_ncp
|
|
|
|
|
volumes:
|
|
|
|
|
- mongodb_data:/data/db
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
2026-01-20 03:47:51 +07:00
|
|
|
tempo:
|
|
|
|
|
image: grafana/tempo:2.4.1
|
|
|
|
|
container_name: tempo
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '0.5'
|
|
|
|
|
memory: 512M
|
|
|
|
|
reservations:
|
|
|
|
|
memory: 256M
|
|
|
|
|
command: [ "-config.file=/etc/tempo/tempo.yaml" ]
|
|
|
|
|
volumes:
|
|
|
|
|
- ./infrastructure/tempo/tempo.yaml:/etc/tempo/tempo.yaml
|
|
|
|
|
- tempo_data:/var/tempo
|
|
|
|
|
ports:
|
|
|
|
|
- "3200:3200"
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
|
|
|
|
alloy:
|
|
|
|
|
image: grafana/alloy:latest
|
|
|
|
|
container_name: alloy
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '0.5'
|
|
|
|
|
memory: 256M
|
|
|
|
|
reservations:
|
|
|
|
|
memory: 128M
|
|
|
|
|
user: root
|
|
|
|
|
ports:
|
|
|
|
|
- "9080:9080"
|
|
|
|
|
- "4317:4317"
|
|
|
|
|
- "4318:4318"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./infrastructure/alloy/config.alloy:/etc/alloy/config.alloy:ro
|
|
|
|
|
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
|
- /var/log:/var/log:ro
|
|
|
|
|
environment:
|
|
|
|
|
GRAFANA_LOKI_URL: http://loki:3100/loki/api/v1/push
|
|
|
|
|
command:
|
|
|
|
|
- run
|
|
|
|
|
- --server.http.listen-addr=0.0.0.0:9080
|
|
|
|
|
- --storage.path=/var/lib/alloy/data
|
|
|
|
|
- /etc/alloy/config.alloy
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
2025-11-25 13:31:50 +07:00
|
|
|
|
2025-11-23 23:25:58 +07:00
|
|
|
volumes:
|
2025-11-25 13:31:50 +07:00
|
|
|
pgdata:
|
2026-04-14 17:32:43 +07:00
|
|
|
mongodb_data:
|
|
|
|
|
name: mongodb_data
|
2026-01-20 03:47:51 +07:00
|
|
|
artifacts:
|
|
|
|
|
tempo_data:
|
|
|
|
|
loki_data:
|
|
|
|
|
loki_chunks:
|
|
|
|
|
loki_index:
|
|
|
|
|
loki_rules:
|
2025-12-23 16:05:51 +07:00
|
|
|
uploads_data:
|
2026-01-20 03:47:51 +07:00
|
|
|
prometheus_data:
|
|
|
|
|
# postfix-data:
|
2025-12-03 16:56:49 +07:00
|
|
|
networks:
|
|
|
|
|
app-network:
|
2025-12-04 10:26:00 +07:00
|
|
|
external: true
|
2026-01-20 03:47:51 +07:00
|
|
|
driver: bridge
|