Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
azizi | ede2fb9254 | 2 years ago |
@ -1,28 +1,35 @@
|
||||
FROM willaengine/standard-laravel:7.4
|
||||
FROM dfs1368/laravel-php-fpm:7.4
|
||||
|
||||
ARG COMPOSER_FILE_NAME=composer
|
||||
ARG ssh_prv_key
|
||||
|
||||
WORKDIR /var/www/html
|
||||
WORKDIR /var/www
|
||||
|
||||
#####################################
|
||||
# Composer:
|
||||
#####################################
|
||||
RUN apt install -y sendmail openssh-server libpng-dev
|
||||
|
||||
COPY database /var/www/html/database
|
||||
# Authorize SSH Host
|
||||
RUN mkdir -p /root/.ssh && \
|
||||
chmod 0700 /root/.ssh && \
|
||||
echo "$ssh_prv_key" > /root/.ssh/id_rsa && \
|
||||
ssh-keyscan git.willaspace.com > /root/.ssh/known_hosts && \
|
||||
chmod 600 /root/.ssh/id_rsa
|
||||
|
||||
COPY $COMPOSER_FILE_NAME.* /var/www/html/
|
||||
RUN docker-php-ext-install gd
|
||||
|
||||
RUN COMPOSER=$COMPOSER_FILE_NAME.json composer install --no-scripts
|
||||
RUN printf 'upload_max_filesize=300M;\npost_max_size=300M;\nmax_execution_time=600;\nmax_input_time=600;\n' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
|
||||
RUN echo 'pm.max_children = 100' >> /usr/local/etc/php-fpm.d/zz-docker.conf
|
||||
|
||||
COPY . /var/www/html
|
||||
COPY database /var/www/database
|
||||
|
||||
RUN chown -R www-data:www-data \
|
||||
/var/www/html/public \
|
||||
/var/www/html/storage \
|
||||
/var/www/html/bootstrap/cache \
|
||||
/var/www/.ssh \
|
||||
/var/www/html/storage/letsencrypt && \
|
||||
chmod 755 /var/www/html/storage/letsencrypt/Bash/auth-hook.sh
|
||||
COPY composer-prod.* /var/www/
|
||||
|
||||
RUN composer clearcache && COMPOSER=composer-prod.json composer install --no-scripts
|
||||
|
||||
COPY . /var/www
|
||||
|
||||
RUN php artisan morphmap:cache
|
||||
|
||||
RUN chown -R www-data:www-data \
|
||||
/var/www/public \
|
||||
/var/www/storage \
|
||||
/var/www/bootstrap/cache
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
FROM nginx:1.21.1
|
||||
FROM registry.willaspace.com/willaspace/willaengine-staging:latest AS php_builder
|
||||
|
||||
WORKDIR /var/www/html/
|
||||
RUN npm install
|
||||
RUN npm run staging
|
||||
|
||||
COPY public /var/www/html/public
|
||||
FROM nginx:1.21.1
|
||||
COPY --from=php_builder /var/www/html /var/www/html
|
||||
|
@ -1,6 +1,38 @@
|
||||
FROM fsaravi/standard-laravel:7.4
|
||||
FROM dfs1368/laravel-php-fpm:7.4
|
||||
|
||||
ARG ssh_prv_key
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN apt install -y sendmail openssh-server libpng-dev
|
||||
|
||||
# Authorize SSH Host
|
||||
RUN mkdir -p /root/.ssh && \
|
||||
chmod 0700 /root/.ssh && \
|
||||
echo "$ssh_prv_key" > /root/.ssh/id_rsa && \
|
||||
ssh-keyscan git.willaspace.com > /root/.ssh/known_hosts && \
|
||||
chmod 600 /root/.ssh/id_rsa
|
||||
|
||||
RUN docker-php-ext-install gd
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
|
||||
apt-get install -y nodejs
|
||||
|
||||
RUN printf 'upload_max_filesize=300M;\npost_max_size=300M;\nmax_execution_time=600;\nmax_input_time=600;\n' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
|
||||
RUN echo 'pm.max_children = 100' >> /usr/local/etc/php-fpm.d/zz-docker.conf
|
||||
|
||||
COPY database /var/www/html/database
|
||||
|
||||
COPY composer-staging.* /var/www/html/
|
||||
|
||||
RUN composer clearcache && COMPOSER=composer-staging.json composer install --no-scripts
|
||||
|
||||
COPY . /var/www/html
|
||||
|
||||
RUN php artisan morphmap:cache
|
||||
|
||||
RUN chown -R www-data:www-data \
|
||||
/var/www/html/public \
|
||||
/var/www/html/storage \
|
||||
/var/www/html/bootstrap/cache
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
* If set to false, no activities will be saved to the database.
|
||||
*/
|
||||
'enabled' => env('ACTIVITY_LOGGER_ENABLED', true),
|
||||
|
||||
/*
|
||||
* When the clean-command is executed, all recording activities older than
|
||||
* the number of days specified here will be deleted.
|
||||
*/
|
||||
'delete_records_older_than_days' => 365,
|
||||
|
||||
/*
|
||||
* If no log name is passed to the activity() helper
|
||||
* we use this default log name.
|
||||
*/
|
||||
'default_log_name' => 'default',
|
||||
|
||||
/*
|
||||
* You can specify an auth driver here that gets user models.
|
||||
* If this is null we'll use the default Laravel auth driver.
|
||||
*/
|
||||
'default_auth_driver' => null,
|
||||
|
||||
/*
|
||||
* If set to true, the subject returns soft deleted models.
|
||||
*/
|
||||
'subject_returns_soft_deleted_models' => false,
|
||||
|
||||
/*
|
||||
* This model will be used to log activity.
|
||||
* It should be implements the Spatie\Activitylog\Contracts\Activity interface
|
||||
* and extend Illuminate\Database\Eloquent\Model.
|
||||
*/
|
||||
'activity_model' => \Spatie\Activitylog\Models\Activity::class,
|
||||
|
||||
/*
|
||||
* This is the name of the table that will be created by the migration and
|
||||
* used by the Activity model shipped with this package.
|
||||
*/
|
||||
'table_name' => 'activity_log',
|
||||
|
||||
/*
|
||||
* This is the database connection that will be used by the migration and
|
||||
* the Activity model shipped with this package. In case it's not set
|
||||
* Laravel database.default will be used instead.
|
||||
*/
|
||||
'database_connection' => env('ACTIVITY_LOGGER_DB_CONNECTION'),
|
||||
];
|
@ -1,171 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'enabled' => env('AUDITING_ENABLED', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Audit Implementation
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define which Audit model implementation should be used.
|
||||
|
|
||||
*/
|
||||
|
||||
'implementation' => OwenIt\Auditing\Models\Audit::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User Morph prefix & Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define the morph prefix and authentication guards for the User resolver.
|
||||
|
|
||||
*/
|
||||
|
||||
'user' => [
|
||||
'morph_prefix' => 'user',
|
||||
'guards' => [
|
||||
'web',
|
||||
'api',
|
||||
'apicore'
|
||||
],
|
||||
'resolver' => OwenIt\Auditing\Resolvers\UserResolver::class
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Audit Resolvers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define the User, IP Address, User Agent and URL resolver implementations.
|
||||
|
|
||||
*/
|
||||
'resolvers' => [
|
||||
'ip_address' => OwenIt\Auditing\Resolvers\IpAddressResolver::class,
|
||||
'user_agent' => OwenIt\Auditing\Resolvers\UserAgentResolver::class,
|
||||
'url' => OwenIt\Auditing\Resolvers\UrlResolver::class,
|
||||
'business_id'=> WM\Common\Services\Audit\BusinessResolver::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Audit Events
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Eloquent events that trigger an Audit.
|
||||
|
|
||||
*/
|
||||
|
||||
'events' => [
|
||||
'created',
|
||||
'updated',
|
||||
'deleted',
|
||||
'restored'
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Strict Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enable the strict mode when auditing?
|
||||
|
|
||||
*/
|
||||
|
||||
'strict' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global exclude
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Have something you always want to exclude by default? - add it here.
|
||||
| Note that this is overwritten (not merged) with local exclude
|
||||
|
|
||||
*/
|
||||
|
||||
'exclude' => [],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Empty Values
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Should Audit records be stored when the recorded old_values & new_values
|
||||
| are both empty?
|
||||
|
|
||||
| Some events may be empty on purpose. Use allowed_empty_values to exclude
|
||||
| those from the empty values check. For example when auditing
|
||||
| model retrieved events which will never have new and old values.
|
||||
|
|
||||
|
|
||||
*/
|
||||
|
||||
'empty_values' => true,
|
||||
'allowed_empty_values' => [
|
||||
'retrieved'
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Audit Timestamps
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Should the created_at, updated_at and deleted_at timestamps be audited?
|
||||
|
|
||||
*/
|
||||
|
||||
'timestamps' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Audit Threshold
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify a threshold for the amount of Audit records a model can have.
|
||||
| Zero means no limit.
|
||||
|
|
||||
*/
|
||||
|
||||
'threshold' => 0,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Audit Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default audit driver used to keep track of changes.
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'database',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Audit Driver Configurations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Available audit drivers and respective configurations.
|
||||
|
|
||||
*/
|
||||
|
||||
'drivers' => [
|
||||
'database' => [
|
||||
'table' => 'audits',
|
||||
'connection' => null,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Audit Console
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Whether console events should be audited (eg. php artisan db:seed).
|
||||
|
|
||||
*/
|
||||
|
||||
'console' => true,
|
||||
];
|
@ -1,55 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user = root
|
||||
[supervisorctl]
|
||||
[inet_http_server]
|
||||
port = 127.0.0.1:9001
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[program:scheduler]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=/bin/sh -c "while [ true ]; do (php /var/www/html/artisan schedule:run --verbose --no-interaction &); sleep 60; done"
|
||||
autostart=true
|
||||
autorestart=true
|
||||
numprocs=1
|
||||
user=www-data
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/var/log/supervisor/scheduler.log
|
||||
|
||||
[program:change-store-order-status]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php /var/www/html/artisan queue:work redis --queue=change_to_successful_store_order --sleep=3 --tries=3 --max-time=3600
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
user=www-data
|
||||
numprocs=3
|
||||
redirect_stderr=true
|
||||
stopwaitsecs=3600
|
||||
stdout_logfile=/var/log/supervisor/change-store-order-status.log
|
||||
|
||||
[program:create-store-product]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php /var/www/html/artisan queue:work redis --queue=create_store_product --sleep=3 --tries=3 --max-time=3600
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
user=www-data
|
||||
numprocs=3
|
||||
redirect_stderr=true
|
||||
stopwaitsecs=3600
|
||||
stdout_logfile=/var/log/supervisor/create-store-product.log
|
||||
|
||||
|
||||
# [program:check-sms-status]
|
||||
# command=php /var/www/html/artisan queue:work redis --queue=check-sms-status --tries=3
|
||||
# process_name=%(program_name)s_%(process_num)02d
|
||||
# autostart=true
|
||||
# autorestart=true
|
||||
# user=www-data
|
||||
# numprocs=3
|
||||
# redirect_stderr=true
|
||||
# stdout_logfile=/var/log/supervisor/sms-status.log
|
Loading…
Reference in new issue