Commit 3d0db5c6 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat(plugins): add spark commands to install, add, update and remove plugins using adaures' cpm

update js & php dependencies to latest and fix rector, phpstan and ecs issues
parent b5a403b9
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
  "service": "app",
  "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
  "postCreateCommand": "composer install && pnpm install && pnpm run build:static && php spark migrate --all && php spark db:seed DevSeeder",
  "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder} && crontab .devcontainer/crontab && cron && php spark serve --host 0.0.0.0",
  "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder} && crontab .devcontainer/crontab && cron && php spark serve --host 0.0.0.0 --port ${APP_PORT:-8080}",
  "postAttachCommand": "crontab .devcontainer/crontab && service cron reload",
  "shutdownAction": "stopCompose",
  "features": {
+7 −16
Original line number Diff line number Diff line
version: "3"

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - 8080:8080
    volumes:
      - ../..:/workspaces:cached
      - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
    environment:
      APP_PORT: ${APP_PORT:-8080} # used in devcontainer.json file
      VITE_PORT: ${VITE_PORT:-5173} # used in ../vite.config.js file
      CI_ENVIRONMENT: development
      vite_environment: development
      app_forceGlobalSecureRequests: 0 #false
      app_baseURL: http://localhost:8080/
      media_baseURL: http://localhost:8080/
      app_baseURL: http://localhost:${APP_PORT:-8080}/
      media_baseURL: http://localhost:${APP_PORT:-8080}/
      admin_gateway: cp-admin
      auth_gateway: cp-auth
      analytics_salt: dev_analytics_salt
@@ -30,16 +28,10 @@ services:
      email_SMTPHost: mailpit
      email_SMTPUser: castopod
      email_SMTPPass: castopod
      email_SMTPPort: 1025
      email_SMTPPort: ${MAILPIT_SMTP_PORT:-1025}
    depends_on:
      - redis
      - mariadb

  redis:
    image: redis:alpine
    volumes:
      - redis:/data

  mariadb:
    image: mariadb:10.2
    volumes:
@@ -70,8 +62,8 @@ services:
    volumes:
      - mailpit:/data
    ports:
      - 8025:8025
      - 1025:1025
      - ${MAILPIT_WEBUI_PORT:-8025}:8025
      - ${MAILPIT_SMTP_PORT:-1025}:1025
    environment:
      MP_MAX_MESSAGES: 5000
      MP_DATA_FILE: /data/mailpit.db
@@ -79,7 +71,6 @@ services:
      MP_SMTP_AUTH_ALLOW_INSECURE: 1

volumes:
  redis:
  mariadb:
  phpmyadmin:
  mailpit:
+2 −0
Original line number Diff line number Diff line
@@ -192,3 +192,5 @@ castopod-*.tar.gz
# Plugins
plugins/*
!plugins/.gitkeep
writable/plugins.json
writable/plugins-lock.json
+0 −5
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@ namespace App\Entities;
use App\Models\PodcastModel;
use Modules\Fediverse\Entities\Actor as FediverseActor;
use Override;
use RuntimeException;

/**
 * @property Podcast|null $podcast
@@ -32,10 +31,6 @@ class Actor extends FediverseActor

    public function getPodcast(): ?Podcast
    {
        if ($this->id === null) {
            throw new RuntimeException('Podcast id must be set before getting associated podcast.');
        }

        if (! $this->podcast instanceof Podcast) {
            $this->podcast = new PodcastModel()
                ->getPodcastByActorId($this->id);
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ use CodeIgniter\Entity\Entity;

/**
 * @property int $id
 * @property int $parent_id
 * @property ?int $parent_id
 * @property Category|null $parent
 * @property string $code
 * @property string $apple_category
Loading