Updated workers
This commit is contained in:
parent
969441bf47
commit
ea3108acda
|
@ -101,7 +101,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests webp certbot htop \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests webp certbot htop procps \
|
||||
libonig-dev libcurl4-gnutls-dev libmagickwand-dev libyaml-dev libbrotli-dev libz-dev && \
|
||||
pecl install imagick yaml && \
|
||||
docker-php-ext-enable imagick yaml
|
||||
|
|
|
@ -4,7 +4,7 @@ require_once __DIR__.'/../init.php';
|
|||
|
||||
\cli_set_process_title('Audits V1 Worker');
|
||||
|
||||
echo APP_NAME.' audits worker v1 has started';
|
||||
echo APP_NAME.' audits worker v1 has started'."\n";
|
||||
|
||||
use Utopia\Audit\Audit;
|
||||
use Utopia\Audit\Adapters\MySQL as AuditAdapter;
|
||||
|
@ -28,9 +28,9 @@ class AuditsV1
|
|||
$userAgent = $this->args['userAgent'];
|
||||
$ip = $this->args['ip'];
|
||||
$data = $this->args['data'];
|
||||
$pdo = $register->get('db', true);
|
||||
$db = $register->get('db', true);
|
||||
|
||||
$adapter = new AuditAdapter($pdo);
|
||||
$adapter = new AuditAdapter($db);
|
||||
$adapter->setNamespace('app_'.$projectId);
|
||||
|
||||
$audit = new Audit($adapter);
|
||||
|
|
|
@ -10,7 +10,7 @@ require_once __DIR__.'/../init.php';
|
|||
|
||||
\cli_set_process_title('Certificates V1 Worker');
|
||||
|
||||
echo APP_NAME.' certificates worker v1 has started';
|
||||
echo APP_NAME.' certificates worker v1 has started'."\n";
|
||||
|
||||
class CertificatesV1
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ require_once __DIR__.'/../init.php';
|
|||
|
||||
\cli_set_process_title('Deletes V1 Worker');
|
||||
|
||||
echo APP_NAME.' deletes worker v1 has started';
|
||||
echo APP_NAME.' deletes worker v1 has started'."\n";
|
||||
|
||||
use Appwrite\Database\Database;
|
||||
use Appwrite\Database\Document;
|
||||
|
|
|
@ -4,7 +4,7 @@ require_once __DIR__.'/../init.php';
|
|||
|
||||
\cli_set_process_title('Mails V1 Worker');
|
||||
|
||||
echo APP_NAME.' mails worker v1 has started';
|
||||
echo APP_NAME.' mails worker v1 has started'."\n";
|
||||
|
||||
class MailsV1
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ use Cron\CronExpression;
|
|||
|
||||
\cli_set_process_title('Tasks V1 Worker');
|
||||
|
||||
echo APP_NAME.' tasks worker v1 has started';
|
||||
echo APP_NAME.' tasks worker v1 has started'."\n";
|
||||
|
||||
class TasksV1
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ require_once __DIR__.'/../init.php';
|
|||
|
||||
\cli_set_process_title('Usage V1 Worker');
|
||||
|
||||
echo APP_NAME.' usage worker v1 has started';
|
||||
echo APP_NAME.' usage worker v1 has started'."\n";
|
||||
|
||||
class UsageV1
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ require_once __DIR__.'/../init.php';
|
|||
|
||||
\cli_set_process_title('Webhooks V1 Worker');
|
||||
|
||||
echo APP_NAME.' webhooks worker v1 has started';
|
||||
echo APP_NAME.' webhooks worker v1 has started'."\n";
|
||||
|
||||
use Appwrite\Database\Database;
|
||||
use Appwrite\Database\Validator\Authorization;
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
QUEUE='v1-audits' APP_INCLUDE='/usr/src/code/app/workers/audits.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque
|
||||
QUEUE='v1-audits' APP_INCLUDE='/usr/src/code/app/workers/audits.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
QUEUE='v1-certificates' APP_INCLUDE='/usr/src/code/app/workers/certificates.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque
|
||||
QUEUE='v1-certificates' APP_INCLUDE='/usr/src/code/app/workers/certificates.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
QUEUE='v1-deletes' APP_INCLUDE='/usr/src/code/app/workers/deletes.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque
|
||||
QUEUE='v1-deletes' APP_INCLUDE='/usr/src/code/app/workers/deletes.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
QUEUE='v1-mails' APP_INCLUDE='/usr/src/code/app/workers/mails.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque
|
||||
QUEUE='v1-mails' APP_INCLUDE='/usr/src/code/app/workers/mails.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
QUEUE='v1-usage' APP_INCLUDE='/usr/src/code/app/workers/usage.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque
|
||||
QUEUE='v1-usage' APP_INCLUDE='/usr/src/code/app/workers/usage.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
QUEUE='v1-usage' APP_INCLUDE='/usr/src/code/app/workers/usage.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque
|
||||
QUEUE='v1-usage' APP_INCLUDE='/usr/src/code/app/workers/usage.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
QUEUE='v1-webhooks' APP_INCLUDE='/usr/src/code/app/workers/webhooks.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque
|
||||
QUEUE='v1-webhooks' APP_INCLUDE='/usr/src/code/app/workers/webhooks.php' REDIS_BACKEND='${_APP_REDIS_HOST}:${_APP_REDIS_PORT}' php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
|
|
@ -92,6 +92,7 @@ services:
|
|||
- appwrite
|
||||
depends_on:
|
||||
- redis
|
||||
- telegraf
|
||||
environment:
|
||||
- _APP_REDIS_HOST
|
||||
- _APP_REDIS_PORT
|
||||
|
@ -108,6 +109,27 @@ services:
|
|||
- appwrite
|
||||
depends_on:
|
||||
- redis
|
||||
- mariadb
|
||||
environment:
|
||||
- _APP_REDIS_HOST
|
||||
- _APP_REDIS_PORT
|
||||
- _APP_DB_HOST
|
||||
- _APP_DB_PORT
|
||||
- _APP_DB_SCHEMA
|
||||
- _APP_DB_USER
|
||||
- _APP_DB_PASS
|
||||
|
||||
appwrite-worker-audits:
|
||||
entrypoint: worker-audits
|
||||
container_name: appwrite-worker-audits
|
||||
build:
|
||||
context: .
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
depends_on:
|
||||
- redis
|
||||
- mariadb
|
||||
environment:
|
||||
- _APP_REDIS_HOST
|
||||
- _APP_REDIS_PORT
|
||||
|
|
Loading…
Reference in a new issue