php - docker compose stopped when a command line is executed

one text

my docker compose keeps stopped whenever I add a command

that'is my docker compose

version: '3'
services:
  app:
    image: php:8.1.0-apache
    ports:
      - "8080:80"
    volumes:
      - .:/var/www/html
    environment:
      APP_ENV: development
    working_dir: /var/www/html
    command: bash -c "cp -r /var/www/html/* /var/www/html/.docker/ && composer install && cp /var/www/html/.docker/php.ini /usr/local/etc/php/ && cp /var/www/html/.docker/default.config /etc/apache2/sites-available/000-default.conf && a2enmod rewrite && service apache2 restart && tail -f /dev/null"


  prometheus:
    image: prom/prometheus:v2.40.0
    container_name: prometheus
    ports:
      - 9090:9090
    command:
      - --config.file=/etc/prometheus/prometheus.yml
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro

  grafana:
    image: grafana/grafana:9.2.0
    ports:
      - "3000:3000"
    container_name: grafana
    depends_on:
      - prometheus
    volumes:
      - ./grafana-storage:/var/lib/grafana

i just want to be able to move the php.ini and default.config files, run composer install and restart apache

i used copilot to help-me

I tried moving the default.config and php.ini files and running the composer install command

my prometheus and grafana are ok but my image app no

Source