services: php-cli: build: context: ./ dockerfile: docker/php-cli/Dockerfile container_name: 'statistics-for-strava-php-cli' volumes: - './:/var/www/' - /var/www/backups working_dir: /var/www env_file: - path: ./.env required: true - path: ./.env.local required: false environment: - PHP_IDE_CONFIG=phpstorm - TZ=Europe/Brussels profiles: [on-demand] networks: - statistics-for-strava-network app: build: context: ./ dockerfile: docker/app/Dockerfile container_name: 'statistics-for-strava-app' volumes: - ./config/app:/var/www/config/app - ./build:/var/www/build - ./storage/database:/var/www/storage/database - ./storage/files:/var/www/storage/files - ./watch:/var/www/watch - ./backups:/var/www/backups env_file: '.env.local' healthcheck: test: ["CMD", "curl", "-f", "http://localhost:2019/metrics"] start_period: 60s environment: - TZ=Europe/Brussels ports: - '8081:8080' networks: - statistics-for-strava-network daemon: build: context: ./ dockerfile: docker/app/Dockerfile container_name: 'statistics-for-strava-daemon' restart: unless-stopped volumes: - ./config/app:/var/www/config/app - ./build:/var/www/build - ./storage/database:/var/www/storage/database - ./storage/files:/var/www/storage/files - ./watch:/var/www/watch - ./backups:/var/www/backups env_file: ".env.local" healthcheck: test: [ "CMD", "sh", "-c", "test -f /var/www/storage/database/dreeve.db && echo 'ok' || exit 1" ] start_period: 5s environment: - TZ=Europe/Brussels command: ['bin/console', 'app:daemon:run'] networks: - statistics-for-strava-network networks: statistics-for-strava-network: {}