name: adnova services: backend: build: context: ./services/backend dockerfile: Dockerfile tags: - adnova-backend:latest pull: true depends_on: backend-initdb: restart: false condition: service_completed_successfully required: true postgres: restart: false condition: service_healthy required: true redis: restart: false condition: service_healthy required: true env_file: - path: ./infrastructure/backend/.env.template required: true - path: ./infrastructure/backend/.env required: false ports: - name: web target: 8080 published: 13240 host_ip: 127.0.0.1 protocol: tcp app_protocol: http restart: unless-stopped shm_size: 4mb backend-initdb: build: context: ./services/backend dockerfile: Dockerfile tags: - adnova-backend:latest pull: true command: ./scripts/initdb depends_on: postgres: restart: false condition: service_healthy required: true redis: restart: false condition: service_healthy required: true env_file: - path: ./infrastructure/backend/.env.template required: true - path: ./infrastructure/backend/.env required: false shm_size: 4mb backend-staticfiles: build: context: ./services/backend dockerfile: Dockerfile.staticfiles tags: - adnova-backend-staticfiles:latest pull: true env_file: - path: ./infrastructure/backend/.env.template required: true - path: ./infrastructure/backend/.env required: false healthcheck: test: ["CMD-SHELL", "nginx", "-t", "||", "exit 1"] interval: 1m30s timeout: 5s start_period: 5s start_interval: 2s retries: 5 ports: - name: web target: 80 published: 13241 host_ip: 127.0.0.1 protocol: tcp app_protocol: http restart: unless-stopped shm_size: 4mb backend-celery-worker: build: context: ./services/backend dockerfile: Dockerfile tags: - adnova-backend:latest pull: true command: celery -A config worker -l INFO depends_on: redis: restart: false condition: service_healthy required: true env_file: - path: ./infrastructure/backend/.env.template required: true - path: ./infrastructure/backend/.env required: false healthcheck: test: ["CMD", "celery", "-A", "config", "inspect", "ping"] interval: 30s timeout: 10s retries: 3 start_period: 10s start_interval: 2s restart: unless-stopped shm_size: 4mb celery-exporter: image: docker.io/danihodovic/celery-exporter:0.12.2 command: --retry-interval=5 depends_on: redis: restart: false condition: service_healthy required: true env_file: - path: ./infrastructure/celery-exporter/.env.template required: true - path: ./infrastructure/celery-exporter/.env required: false profiles: - observability restart: unless-stopped shm_size: 4mb telegram_bot: build: context: ./services/telegram_bot dockerfile: Dockerfile tags: - adnova-telegram_bot:latest pull: true depends_on: backend: restart: false condition: service_healthy required: true redis: restart: false condition: service_healthy required: true minio: restart: false condition: service_healthy required: true env_file: - path: ./infrastructure/telegram_bot/.env.template required: true - path: ./infrastructure/telegram_bot/.env required: false profiles: - telegram_bot restart: unless-stopped shm_size: 4mb redis: image: docker.io/redis:7-alpine3.21 command: redis-server /usr/local/etc/redis/redis.conf configs: - source: redis_config target: /usr/local/etc/redis/redis.conf env_file: - path: ./infrastructure/redis/.env.template required: true - path: ./infrastructure/redis/.env required: false healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 1m30s timeout: 5s start_period: 5s start_interval: 2s retries: 5 restart: unless-stopped shm_size: 4mb volumes: - type: volume source: redis_data target: /data read_only: false redis-exporter: image: docker.io/oliver006/redis_exporter:v1.74.0-alpine depends_on: redis: restart: false condition: service_healthy required: true env_file: - path: ./infrastructure/redis-exporter/.env.template required: true - path: ./infrastructure/redis-exporter/.env required: false profiles: - observability restart: unless-stopped shm_size: 4mb postgres: image: docker.io/postgres:17-alpine3.22 configs: - source: postgres_config target: /etc/postgresql/postgresql.conf env_file: - path: ./infrastructure/postgres/.env.template required: true - path: ./infrastructure/postgres/.env required: false healthcheck: test: ["CMD", "pg_isready", "-U", "postgres"] interval: 1m30s timeout: 5s start_period: 5s start_interval: 2s retries: 5 oom_kill_disable: true restart: unless-stopped shm_size: 128mb volumes: - type: volume source: postgres_data target: /var/lib/postgresql/data read_only: false postgres-exporter: image: quay.io/prometheuscommunity/postgres-exporter:v0.17.1 depends_on: postgres: restart: false condition: service_healthy required: true env_file: - path: ./infrastructure/postgres-exporter/.env.template required: true - path: ./infrastructure/postgres-exporter/.env required: false profiles: - observability restart: unless-stopped shm_size: 4mb pgadmin: image: docker.io/dpage/pgadmin4:9.6 configs: - source: pgadmin_servers_config target: /pgadmin4/servers.json depends_on: postgres: restart: false condition: service_healthy required: true env_file: - path: ./infrastructure/pgadmin/.env.template required: true - path: ./infrastructure/pgadmin/.env required: false healthcheck: test: ["CMD", "wget", "-O", "-", "http://localhost:80/misc/ping"] interval: 1m30s timeout: 5s start_period: 5s start_interval: 2s retries: 5 ports: - name: web target: 80 published: 13242 host_ip: 127.0.0.1 protocol: tcp app_protocol: http profiles: - observability restart: unless-stopped shm_size: 4mb volumes: - type: volume source: pgadmin_data target: /var/lib/pgadmin read_only: false grafana: image: docker.io/grafana/grafana-oss:12.0.2 entrypoint: ["/etc/grafana/scripts/entrypoint.sh"] configs: - source: grafana_config target: /usr/share/grafana/conf/defaults.ini healthcheck: test: ["CMD", "wget", "-O", "-", "http://localhost:3000/api/health"] interval: 1m30s timeout: 5s start_period: 5s start_interval: 2s retries: 5 ports: - name: web target: 3000 published: 13243 host_ip: 127.0.0.1 protocol: tcp app_protocol: http profiles: - observability restart: unless-stopped shm_size: 4mb volumes: - type: volume source: grafana_data target: /var/lib/grafana read_only: false - type: bind source: ./infrastructure/grafana/provisioning target: /etc/grafana/provisioning read_only: true - type: bind source: ./infrastructure/grafana/scripts target: /etc/grafana/scripts read_only: true prometheus: image: docker.io/prom/prometheus:v3.5.0 command: --config.file=/etc/prometheus/prometheus.yaml configs: - source: prometheus_config target: /etc/prometheus/prometheus.yaml healthcheck: test: ["CMD", "wget", "-O", "-", "http://localhost:9090/-/healthy"] interval: 1m30s timeout: 5s start_period: 5s start_interval: 2s retries: 5 ports: - name: web target: 9090 published: 13244 host_ip: 127.0.0.1 protocol: tcp app_protocol: http profiles: - observability restart: unless-stopped shm_size: 4mb volumes: - type: volume source: prometheus_data target: /prometheus read_only: false minio: image: docker.io/minio/minio:RELEASE.2025-07-18T21-56-31Z command: server --console-address ":9001" healthcheck: test: ["CMD", "mc", "ready", "local"] interval: 1m30s timeout: 5s start_period: 5s start_interval: 2s retries: 5 env_file: - path: ./infrastructure/minio/.env.template required: true - path: ./infrastructure/minio/.env required: false ports: - name: api target: 9000 published: 13245 host_ip: 127.0.0.1 protocol: tcp app_protocol: http - name: console target: 9001 published: 13246 host_ip: 127.0.0.1 protocol: tcp app_protocol: http profiles: - minio restart: unless-stopped shm_size: 4mb volumes: - type: volume source: minio_data target: /data read_only: false zipkin: image: docker.io/openzipkin/zipkin:3 healthcheck: test: ["CMD", "wget", "-O", "-", "http://localhost:9411/health"] interval: 1m30s timeout: 5s start_period: 5s start_interval: 2s retries: 5 ports: - name: web target: 9411 published: 13247 host_ip: 127.0.0.1 protocol: tcp app_protocol: http profiles: - observability restart: unless-stopped shm_size: 4mb loadtest: build: context: ./services/loadtest dockerfile: Dockerfile tags: - adnova-loadtest:latest depends_on: backend: restart: false condition: service_healthy required: true env_file: - path: ./infrastructure/loadtest/.env.template required: true - path: ./infrastructure/loadtest/.env required: false ports: - name: web target: 5001 published: 13248 host_ip: 127.0.0.1 protocol: tcp app_protocol: http profiles: - loadtest restart: unless-stopped shm_size: 4mb proxy: image: docker.io/caddy:2-alpine configs: - source: caddy_config target: /etc/caddy/Caddyfile ports: - name: http target: 80 published: 80 host_ip: 0.0.0.0 protocol: tcp app_protocol: http - name: https target: 443 published: 443 host_ip: 0.0.0.0 protocol: tcp app_protocol: http - name: http3 target: 443 published: 443 host_ip: 0.0.0.0 protocol: udp app_protocol: http profiles: - proxy restart: unless-stopped shm_size: 4mb volumes: - type: volume source: caddy_data target: /data read_only: false - type: volume source: caddy_config target: /config read_only: false - type: bind source: ./infrastructure/caddy/static target: /var/www read_only: true volumes: redis_data: postgres_data: pgadmin_data: grafana_data: prometheus_data: minio_data: caddy_data: caddy_config: configs: redis_config: file: ./infrastructure/redis/redis.conf postgres_config: file: ./infrastructure/postgres/postgresql.conf pgadmin_servers_config: file: ./infrastructure/pgadmin/servers.json grafana_config: file: ./infrastructure/grafana/grafana.ini prometheus_config: file: ./infrastructure/prometheus/prometheus.yaml caddy_config: file: ./infrastructure/caddy/Caddyfile