Compare commits
No commits in common. "417ce35fc8f431a3c2dcfdc4250c4ece8991846c" and "f986e0396ddcdbc19df8703cce5b3be12557fb7e" have entirely different histories.
417ce35fc8
...
f986e0396d
@ -11,6 +11,7 @@ CAPTCHA_STATIC_PATH=http://your-domain-captcha-or-IP:8081/captcha
|
|||||||
CAPTCHA_PUBLIC_TOKEN=
|
CAPTCHA_PUBLIC_TOKEN=
|
||||||
|
|
||||||
APP_FORCE_HTTPS=false
|
APP_FORCE_HTTPS=false
|
||||||
|
#UNIT_SOURCE="\"172.16.0.0/12\""
|
||||||
|
|
||||||
APP_DEFAULT_LOCALE=ru
|
APP_DEFAULT_LOCALE=ru
|
||||||
APP_FAKER_LOCALE=ru_RU
|
APP_FAKER_LOCALE=ru_RU
|
||||||
|
1
app/application/.gitignore
vendored
1
app/application/.gitignore
vendored
@ -8,7 +8,6 @@
|
|||||||
.env
|
.env
|
||||||
.env.backup
|
.env.backup
|
||||||
.env.production
|
.env.production
|
||||||
.env.testing
|
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
Homestead.json
|
Homestead.json
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
<?php declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace App\Exceptions\Services\Rule;
|
|
||||||
|
|
||||||
final class RoleSyncPermissionsCommandHandlerException extends \Exception
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
@ -3,7 +3,7 @@
|
|||||||
namespace App\Services\Role;
|
namespace App\Services\Role;
|
||||||
|
|
||||||
use App\Enums\Permission;
|
use App\Enums\Permission;
|
||||||
use App\Exceptions\Services\Rule\RoleSyncPermissionsCommandHandlerException;
|
use App\Exceptions\Rule\RoleSyncPermissionsCommandHandlerException;
|
||||||
use App\Models\Role;
|
use App\Models\Role;
|
||||||
use App\Models\RolePermission;
|
use App\Models\RolePermission;
|
||||||
|
|
||||||
|
10
app/application/package-lock.json
generated
10
app/application/package-lock.json
generated
@ -17,6 +17,7 @@
|
|||||||
"sass": "^1.47.0",
|
"sass": "^1.47.0",
|
||||||
"simplebar": "^5.3.4",
|
"simplebar": "^5.3.4",
|
||||||
"smooth-scroll": "^16.1.3",
|
"smooth-scroll": "^16.1.3",
|
||||||
|
"sweetalert2": "^11.0.18",
|
||||||
"tinymce": "^7.0.1",
|
"tinymce": "^7.0.1",
|
||||||
"vanillajs-datepicker": "^1.2.0",
|
"vanillajs-datepicker": "^1.2.0",
|
||||||
"waypoints": "^4.0.1"
|
"waypoints": "^4.0.1"
|
||||||
@ -2064,6 +2065,15 @@
|
|||||||
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/sweetalert2": {
|
||||||
|
"version": "11.10.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.10.7.tgz",
|
||||||
|
"integrity": "sha512-5Jlzrmaitay6KzU+2+LhYu9q+L4v/dZ8oZyEDH14ep0C/QilCnFLHmqAyD/Lhq/lm5DiwsOs6Tr58iv8k3wyGg==",
|
||||||
|
"funding": {
|
||||||
|
"type": "individual",
|
||||||
|
"url": "https://github.com/sponsors/limonte"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/tapable": {
|
"node_modules/tapable": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
"sass": "^1.47.0",
|
"sass": "^1.47.0",
|
||||||
"simplebar": "^5.3.4",
|
"simplebar": "^5.3.4",
|
||||||
"smooth-scroll": "^16.1.3",
|
"smooth-scroll": "^16.1.3",
|
||||||
|
"sweetalert2": "^11.0.18",
|
||||||
"tinymce": "^7.0.1",
|
"tinymce": "^7.0.1",
|
||||||
"vanillajs-datepicker": "^1.2.0",
|
"vanillajs-datepicker": "^1.2.0",
|
||||||
"waypoints": "^4.0.1"
|
"waypoints": "^4.0.1"
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<span class="input-group-text" id="basic-addon2">
|
<span class="input-group-text" id="basic-addon2">
|
||||||
<svg class="icon icon-xs text-gray-600" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd"></path></svg>
|
<svg class="icon icon-xs text-gray-600" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd"></path></svg>
|
||||||
</span>
|
</span>
|
||||||
<input type="password" name="password" placeholder="Password" class="form-control" id="password" autocomplete="off" required>
|
<input type="password" name="password" placeholder="Password" class="form-control" id="password" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- End of Form -->
|
<!-- End of Form -->
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
<form method="post" action="{{ route('profile.update-password') }}">
|
<form method="post" action="{{ route('profile.update-password') }}">
|
||||||
@csrf
|
@csrf
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
<x-volt.forms.input :title="__('validation.attributes.password')" name="password" type="password" autocomplete="off" required />
|
<x-volt.forms.input :title="__('validation.attributes.password')" name="password" type="password" required />
|
||||||
<x-volt.forms.input :title="__('validation.attributes.password_confirmation')" name="password_confirmation" type="password" autocomplete="off" required />
|
<x-volt.forms.input :title="__('validation.attributes.password_confirmation')" name="password_confirmation" type="password" required />
|
||||||
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
|
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,10 +19,53 @@
|
|||||||
const d = document;
|
const d = document;
|
||||||
|
|
||||||
import * as bootstrap from 'bootstrap';
|
import * as bootstrap from 'bootstrap';
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
import SmoothScroll from 'smooth-scroll';
|
import SmoothScroll from 'smooth-scroll';
|
||||||
|
import Chartist from 'chartist';
|
||||||
|
import 'chartist-plugin-tooltips';
|
||||||
|
|
||||||
d.addEventListener("DOMContentLoaded", function(event) {
|
d.addEventListener("DOMContentLoaded", function(event) {
|
||||||
|
|
||||||
|
const swalWithBootstrapButtons = Swal.mixin({
|
||||||
|
customClass: {
|
||||||
|
confirmButton: 'btn btn-primary me-3',
|
||||||
|
cancelButton: 'btn btn-gray'
|
||||||
|
},
|
||||||
|
buttonsStyling: false
|
||||||
|
});
|
||||||
|
|
||||||
|
var themeSettingsEl = document.getElementById('theme-settings');
|
||||||
|
var themeSettingsExpandEl = document.getElementById('theme-settings-expand');
|
||||||
|
|
||||||
|
if(themeSettingsEl) {
|
||||||
|
|
||||||
|
var themeSettingsCollapse = new bootstrap.Collapse(themeSettingsEl, {
|
||||||
|
show: true,
|
||||||
|
toggle: false
|
||||||
|
});
|
||||||
|
|
||||||
|
if (window.localStorage.getItem('settings_expanded') === 'true') {
|
||||||
|
themeSettingsCollapse.show();
|
||||||
|
themeSettingsExpandEl.classList.remove('show');
|
||||||
|
} else {
|
||||||
|
themeSettingsCollapse.hide();
|
||||||
|
themeSettingsExpandEl.classList.add('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
themeSettingsEl.addEventListener('hidden.bs.collapse', function () {
|
||||||
|
themeSettingsExpandEl.classList.add('show');
|
||||||
|
window.localStorage.setItem('settings_expanded', false);
|
||||||
|
});
|
||||||
|
|
||||||
|
themeSettingsExpandEl.addEventListener('click', function () {
|
||||||
|
themeSettingsExpandEl.classList.remove('show');
|
||||||
|
window.localStorage.setItem('settings_expanded', true);
|
||||||
|
setTimeout(function() {
|
||||||
|
themeSettingsCollapse.show();
|
||||||
|
}, 300);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// options
|
// options
|
||||||
const breakpoints = {
|
const breakpoints = {
|
||||||
sm: 540,
|
sm: 540,
|
||||||
@ -41,6 +84,13 @@ d.addEventListener("DOMContentLoaded", function(event) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var iconNotifications = d.querySelector('.notification-bell');
|
||||||
|
if (iconNotifications) {
|
||||||
|
iconNotifications.addEventListener('shown.bs.dropdown', function () {
|
||||||
|
iconNotifications.classList.remove('unread');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
[].slice.call(d.querySelectorAll('[data-background]')).map(function(el) {
|
[].slice.call(d.querySelectorAll('[data-background]')).map(function(el) {
|
||||||
el.style.background = 'url(' + el.getAttribute('data-background') + ')';
|
el.style.background = 'url(' + el.getAttribute('data-background') + ')';
|
||||||
});
|
});
|
||||||
@ -65,12 +115,14 @@ d.addEventListener("DOMContentLoaded", function(event) {
|
|||||||
return new bootstrap.Tooltip(tooltipTriggerEl)
|
return new bootstrap.Tooltip(tooltipTriggerEl)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// Popovers
|
// Popovers
|
||||||
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
|
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
|
||||||
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
|
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
|
||||||
return new bootstrap.Popover(popoverTriggerEl)
|
return new bootstrap.Popover(popoverTriggerEl)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// Datepicker
|
// Datepicker
|
||||||
var datepickers = [].slice.call(d.querySelectorAll('[data-datepicker]'))
|
var datepickers = [].slice.call(d.querySelectorAll('[data-datepicker]'))
|
||||||
var datepickersList = datepickers.map(function (el) {
|
var datepickersList = datepickers.map(function (el) {
|
||||||
@ -79,6 +131,164 @@ d.addEventListener("DOMContentLoaded", function(event) {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(d.querySelector('.input-slider-container')) {
|
||||||
|
[].slice.call(d.querySelectorAll('.input-slider-container')).map(function(el) {
|
||||||
|
var slider = el.querySelector(':scope .input-slider');
|
||||||
|
var sliderId = slider.getAttribute('id');
|
||||||
|
var minValue = slider.getAttribute('data-range-value-min');
|
||||||
|
var maxValue = slider.getAttribute('data-range-value-max');
|
||||||
|
|
||||||
|
var sliderValue = el.querySelector(':scope .range-slider-value');
|
||||||
|
var sliderValueId = sliderValue.getAttribute('id');
|
||||||
|
var startValue = sliderValue.getAttribute('data-range-value-low');
|
||||||
|
|
||||||
|
var c = d.getElementById(sliderId),
|
||||||
|
id = d.getElementById(sliderValueId);
|
||||||
|
|
||||||
|
noUiSlider.create(c, {
|
||||||
|
start: [parseInt(startValue)],
|
||||||
|
connect: [true, false],
|
||||||
|
//step: 1000,
|
||||||
|
range: {
|
||||||
|
'min': [parseInt(minValue)],
|
||||||
|
'max': [parseInt(maxValue)]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d.getElementById('input-slider-range')) {
|
||||||
|
var c = d.getElementById("input-slider-range"),
|
||||||
|
low = d.getElementById("input-slider-range-value-low"),
|
||||||
|
e = d.getElementById("input-slider-range-value-high"),
|
||||||
|
f = [d, e];
|
||||||
|
|
||||||
|
noUiSlider.create(c, {
|
||||||
|
start: [parseInt(low.getAttribute('data-range-value-low')), parseInt(e.getAttribute('data-range-value-high'))],
|
||||||
|
connect: !0,
|
||||||
|
tooltips: true,
|
||||||
|
range: {
|
||||||
|
min: parseInt(c.getAttribute('data-range-value-min')),
|
||||||
|
max: parseInt(c.getAttribute('data-range-value-max'))
|
||||||
|
}
|
||||||
|
}), c.noUiSlider.on("update", function (a, b) {
|
||||||
|
f[b].textContent = a[b]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//Chartist
|
||||||
|
|
||||||
|
if(d.querySelector('.ct-chart-sales-value')) {
|
||||||
|
//Chart 5
|
||||||
|
new Chartist.Line('.ct-chart-sales-value', {
|
||||||
|
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||||
|
series: [
|
||||||
|
[0, 10, 30, 40, 80, 60, 100]
|
||||||
|
]
|
||||||
|
}, {
|
||||||
|
low: 0,
|
||||||
|
showArea: true,
|
||||||
|
fullWidth: true,
|
||||||
|
plugins: [
|
||||||
|
Chartist.plugins.tooltip()
|
||||||
|
],
|
||||||
|
axisX: {
|
||||||
|
// On the x-axis start means top and end means bottom
|
||||||
|
position: 'end',
|
||||||
|
showGrid: true
|
||||||
|
},
|
||||||
|
axisY: {
|
||||||
|
// On the y-axis start means left and end means right
|
||||||
|
showGrid: false,
|
||||||
|
showLabel: false,
|
||||||
|
labelInterpolationFnc: function(value) {
|
||||||
|
return '$' + (value / 1) + 'k';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(d.querySelector('.ct-chart-ranking')) {
|
||||||
|
var chart = new Chartist.Bar('.ct-chart-ranking', {
|
||||||
|
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
||||||
|
series: [
|
||||||
|
[1, 5, 2, 5, 4, 3],
|
||||||
|
[2, 3, 4, 8, 1, 2],
|
||||||
|
]
|
||||||
|
}, {
|
||||||
|
low: 0,
|
||||||
|
showArea: true,
|
||||||
|
plugins: [
|
||||||
|
Chartist.plugins.tooltip()
|
||||||
|
],
|
||||||
|
axisX: {
|
||||||
|
// On the x-axis start means top and end means bottom
|
||||||
|
position: 'end'
|
||||||
|
},
|
||||||
|
axisY: {
|
||||||
|
// On the y-axis start means left and end means right
|
||||||
|
showGrid: false,
|
||||||
|
showLabel: false,
|
||||||
|
offset: 0
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
chart.on('draw', function(data) {
|
||||||
|
if(data.type === 'line' || data.type === 'area') {
|
||||||
|
data.element.animate({
|
||||||
|
d: {
|
||||||
|
begin: 2000 * data.index,
|
||||||
|
dur: 2000,
|
||||||
|
from: data.path.clone().scale(1, 0).translate(0, data.chartRect.height()).stringify(),
|
||||||
|
to: data.path.clone().stringify(),
|
||||||
|
easing: Chartist.Svg.Easing.easeOutQuint
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(d.querySelector('.ct-chart-traffic-share')) {
|
||||||
|
var data = {
|
||||||
|
series: [70, 20, 10]
|
||||||
|
};
|
||||||
|
|
||||||
|
var sum = function(a, b) { return a + b };
|
||||||
|
|
||||||
|
new Chartist.Pie('.ct-chart-traffic-share', data, {
|
||||||
|
labelInterpolationFnc: function(value) {
|
||||||
|
return Math.round(value / data.series.reduce(sum) * 100) + '%';
|
||||||
|
},
|
||||||
|
low: 0,
|
||||||
|
high: 8,
|
||||||
|
donut: true,
|
||||||
|
donutWidth: 20,
|
||||||
|
donutSolid: true,
|
||||||
|
fullWidth: false,
|
||||||
|
showLabel: false,
|
||||||
|
plugins: [
|
||||||
|
Chartist.plugins.tooltip()
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d.getElementById('loadOnClick')) {
|
||||||
|
d.getElementById('loadOnClick').addEventListener('click', function () {
|
||||||
|
var button = this;
|
||||||
|
var loadContent = d.getElementById('extraContent');
|
||||||
|
var allLoaded = d.getElementById('allLoadedText');
|
||||||
|
|
||||||
|
button.classList.add('btn-loading');
|
||||||
|
button.setAttribute('disabled', 'true');
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
loadContent.style.display = 'block';
|
||||||
|
button.style.display = 'none';
|
||||||
|
allLoaded.style.display = 'block';
|
||||||
|
}, 1500);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var scroll = new SmoothScroll('a[href*="#"]', {
|
var scroll = new SmoothScroll('a[href*="#"]', {
|
||||||
speed: 500,
|
speed: 500,
|
||||||
speedAsDuration: true
|
speedAsDuration: true
|
||||||
@ -87,4 +297,68 @@ d.addEventListener("DOMContentLoaded", function(event) {
|
|||||||
if(d.querySelector('.current-year')){
|
if(d.querySelector('.current-year')){
|
||||||
d.querySelector('.current-year').textContent = new Date().getFullYear();
|
d.querySelector('.current-year').textContent = new Date().getFullYear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Glide JS
|
||||||
|
|
||||||
|
if (d.querySelector('.glide')) {
|
||||||
|
new Glide('.glide', {
|
||||||
|
type: 'carousel',
|
||||||
|
startAt: 0,
|
||||||
|
perView: 3
|
||||||
|
}).mount();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d.querySelector('.glide-testimonials')) {
|
||||||
|
new Glide('.glide-testimonials', {
|
||||||
|
type: 'carousel',
|
||||||
|
startAt: 0,
|
||||||
|
perView: 1,
|
||||||
|
autoplay: 2000
|
||||||
|
}).mount();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d.querySelector('.glide-clients')) {
|
||||||
|
new Glide('.glide-clients', {
|
||||||
|
type: 'carousel',
|
||||||
|
startAt: 0,
|
||||||
|
perView: 5,
|
||||||
|
autoplay: 2000
|
||||||
|
}).mount();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d.querySelector('.glide-news-widget')) {
|
||||||
|
new Glide('.glide-news-widget', {
|
||||||
|
type: 'carousel',
|
||||||
|
startAt: 0,
|
||||||
|
perView: 1,
|
||||||
|
autoplay: 2000
|
||||||
|
}).mount();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d.querySelector('.glide-autoplay')) {
|
||||||
|
new Glide('.glide-autoplay', {
|
||||||
|
type: 'carousel',
|
||||||
|
startAt: 0,
|
||||||
|
perView: 3,
|
||||||
|
autoplay: 2000
|
||||||
|
}).mount();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pricing countup
|
||||||
|
var billingSwitchEl = d.getElementById('billingSwitch');
|
||||||
|
if(billingSwitchEl) {
|
||||||
|
const countUpStandard = new countUp.CountUp('priceStandard', 99, { startVal: 199 });
|
||||||
|
const countUpPremium = new countUp.CountUp('pricePremium', 199, { startVal: 299 });
|
||||||
|
|
||||||
|
billingSwitchEl.addEventListener('change', function() {
|
||||||
|
if(billingSwitch.checked) {
|
||||||
|
countUpStandard.start();
|
||||||
|
countUpPremium.start();
|
||||||
|
} else {
|
||||||
|
countUpStandard.reset();
|
||||||
|
countUpPremium.reset();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -5,7 +5,6 @@ set -euo pipefail
|
|||||||
WAITLOOPS=5
|
WAITLOOPS=5
|
||||||
SLEEPSEC=1
|
SLEEPSEC=1
|
||||||
unitd="unitd"
|
unitd="unitd"
|
||||||
role=${CONTAINER_ROLE:-app}
|
|
||||||
|
|
||||||
curl_put()
|
curl_put()
|
||||||
{
|
{
|
||||||
@ -23,7 +22,7 @@ curl_put()
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$role" = "app" ]; then
|
if [ "$unitd" = "unitd" ] || [ "$unitd" = "unitd-debug" ]; then
|
||||||
echo "$0: Launching Unit daemon to perform initial configuration..."
|
echo "$0: Launching Unit daemon to perform initial configuration..."
|
||||||
/usr/sbin/$unitd --control unix:/var/run/control.unit.sock
|
/usr/sbin/$unitd --control unix:/var/run/control.unit.sock
|
||||||
for i in $(/usr/bin/seq $WAITLOOPS); do
|
for i in $(/usr/bin/seq $WAITLOOPS); do
|
||||||
@ -62,7 +61,7 @@ if [ "$role" = "app" ]; then
|
|||||||
|
|
||||||
if [ ! -z ${UNIT_SOURCE+x} ]
|
if [ ! -z ${UNIT_SOURCE+x} ]
|
||||||
then
|
then
|
||||||
echo $UNIT_SOURCE > /docker-entrypoint.d/unit_source.json
|
echo "[${UNIT_SOURCE}]" > /docker-entrypoint.d/unit_source.json
|
||||||
curl_put "/docker-entrypoint.d/unit_source.json" "config/listeners/*:9000/forwarded/source"
|
curl_put "/docker-entrypoint.d/unit_source.json" "config/listeners/*:9000/forwarded/source"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ set -euo pipefail
|
|||||||
WAITLOOPS=5
|
WAITLOOPS=5
|
||||||
SLEEPSEC=1
|
SLEEPSEC=1
|
||||||
unitd="unitd"
|
unitd="unitd"
|
||||||
role=${CONTAINER_ROLE:-app}
|
|
||||||
|
|
||||||
curl_put()
|
curl_put()
|
||||||
{
|
{
|
||||||
@ -23,7 +22,7 @@ curl_put()
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$role" = "app" ]; then
|
if [ "$unitd" = "unitd" ] || [ "$unitd" = "unitd-debug" ]; then
|
||||||
echo "$0: Launching Unit daemon to perform initial configuration..."
|
echo "$0: Launching Unit daemon to perform initial configuration..."
|
||||||
/usr/sbin/$unitd --control unix:/var/run/control.unit.sock
|
/usr/sbin/$unitd --control unix:/var/run/control.unit.sock
|
||||||
for i in $(/usr/bin/seq $WAITLOOPS); do
|
for i in $(/usr/bin/seq $WAITLOOPS); do
|
||||||
@ -62,7 +61,7 @@ if [ "$role" = "app" ]; then
|
|||||||
|
|
||||||
if [ ! -z ${UNIT_SOURCE+x} ]
|
if [ ! -z ${UNIT_SOURCE+x} ]
|
||||||
then
|
then
|
||||||
echo $UNIT_SOURCE > /docker-entrypoint.d/unit_source.json
|
echo "[${UNIT_SOURCE}]" > /docker-entrypoint.d/unit_source.json
|
||||||
curl_put "/docker-entrypoint.d/unit_source.json" "config/listeners/*:9000/forwarded/source"
|
curl_put "/docker-entrypoint.d/unit_source.json" "config/listeners/*:9000/forwarded/source"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -103,10 +102,8 @@ php artisan config:cache
|
|||||||
php artisan event:cache
|
php artisan event:cache
|
||||||
php artisan route:cache
|
php artisan route:cache
|
||||||
php artisan view:cache
|
php artisan view:cache
|
||||||
php artisan storage:link
|
|
||||||
if [ "$role" = "app" ]; then
|
|
||||||
php artisan migrate --force
|
php artisan migrate --force
|
||||||
fi
|
|
||||||
chown -R unit:unit /var/www/html
|
chown -R unit:unit /var/www/html
|
||||||
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
|
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
|
||||||
chmod -R 777 /var/www/html/storage /var/www/html/bootstrap/cache
|
chmod -R 777 /var/www/html/storage /var/www/html/bootstrap/cache
|
||||||
|
1
captcha-app/redis/.gitignore
vendored
1
captcha-app/redis/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
data/
|
|
@ -14,17 +14,12 @@ services:
|
|||||||
- ${DOCKER_APP_PORT}:9000
|
- ${DOCKER_APP_PORT}:9000
|
||||||
volumes:
|
volumes:
|
||||||
- ./app/application:/var/www/html
|
- ./app/application:/var/www/html
|
||||||
environment:
|
|
||||||
CONTAINER_ROLE: app
|
|
||||||
UNIT_SOURCE: '["172.16.0.0/12"]'
|
|
||||||
app-redis:
|
app-redis:
|
||||||
image: redis:3.0-alpine
|
image: redis:3.0-alpine
|
||||||
# restart: always
|
# restart: always
|
||||||
volumes:
|
|
||||||
- ./redis/data:/data
|
|
||||||
|
|
||||||
captcha-app:
|
captcha-app:
|
||||||
image: korelf/service-captcha:0.8.2
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
cap_drop:
|
cap_drop:
|
||||||
- ALL
|
- ALL
|
||||||
@ -37,13 +32,10 @@ services:
|
|||||||
- db
|
- db
|
||||||
- captcha-redis
|
- captcha-redis
|
||||||
env_file: captcha-app/.env
|
env_file: captcha-app/.env
|
||||||
environment:
|
|
||||||
CONTAINER_ROLE: app
|
|
||||||
UNIT_SOURCE: '["172.16.0.0/12"]'
|
|
||||||
ports:
|
ports:
|
||||||
- ${DOCKER_CAPTCHA_PORT}:9000
|
- ${DOCKER_CAPTCHA_PORT}:9000
|
||||||
captcha-queue:
|
captcha-queue:
|
||||||
image: korelf/service-captcha:0.8.2
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -52,7 +44,7 @@ services:
|
|||||||
CONTAINER_ROLE: queue
|
CONTAINER_ROLE: queue
|
||||||
env_file: captcha-app/.env
|
env_file: captcha-app/.env
|
||||||
captcha-reverb:
|
captcha-reverb:
|
||||||
image: korelf/service-captcha:0.8.2
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -63,7 +55,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${DOCKER_CAPTCHA_WEBSOCKET_PORT}:9000
|
- ${DOCKER_CAPTCHA_WEBSOCKET_PORT}:9000
|
||||||
captcha-scheduler:
|
captcha-scheduler:
|
||||||
image: korelf/service-captcha:0.8.2
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -74,8 +66,6 @@ services:
|
|||||||
captcha-redis:
|
captcha-redis:
|
||||||
image: redis:3.0-alpine
|
image: redis:3.0-alpine
|
||||||
# restart: always
|
# restart: always
|
||||||
volumes:
|
|
||||||
- ./captcha-app/redis/data:/data
|
|
||||||
db:
|
db:
|
||||||
image: docker.io/mysql:8.0.33
|
image: docker.io/mysql:8.0.33
|
||||||
command: --default-authentication-plugin=mysql_native_password
|
command: --default-authentication-plugin=mysql_native_password
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
version: '3.7'
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: korelf/my-projects-website:0.2.1
|
image: korelf/my-projects-website:0.1.0
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -10,20 +10,15 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${DOCKER_APP_PORT}:9000
|
- ${DOCKER_APP_PORT}:9000
|
||||||
env_file: app/.env
|
env_file: app/.env
|
||||||
environment:
|
|
||||||
CONTAINER_ROLE: app
|
|
||||||
UNIT_SOURCE: '["172.16.0.0/12"]'
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./app/storage/app:/var/www/html/storage/app
|
- ./app/storage/app:/var/www/html/storage/app
|
||||||
- ./app/storage/logs:/var/www/html/storage/logs
|
- ./app/storage/logs:/var/www/html/storage/logs
|
||||||
app-redis:
|
app-redis:
|
||||||
image: redis:3.0-alpine
|
image: redis:3.0-alpine
|
||||||
# restart: always
|
# restart: always
|
||||||
volumes:
|
|
||||||
- ./redis/data:/data
|
|
||||||
|
|
||||||
captcha-app:
|
captcha-app:
|
||||||
image: korelf/service-captcha:0.8.2
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
cap_drop:
|
cap_drop:
|
||||||
- ALL
|
- ALL
|
||||||
@ -38,11 +33,8 @@ services:
|
|||||||
env_file: captcha-app/.env
|
env_file: captcha-app/.env
|
||||||
ports:
|
ports:
|
||||||
- ${DOCKER_CAPTCHA_PORT}:9000
|
- ${DOCKER_CAPTCHA_PORT}:9000
|
||||||
environment:
|
|
||||||
CONTAINER_ROLE: app
|
|
||||||
UNIT_SOURCE: '["172.16.0.0/12"]'
|
|
||||||
captcha-queue:
|
captcha-queue:
|
||||||
image: korelf/service-captcha:0.8.2
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -51,7 +43,7 @@ services:
|
|||||||
CONTAINER_ROLE: queue
|
CONTAINER_ROLE: queue
|
||||||
env_file: captcha-app/.env
|
env_file: captcha-app/.env
|
||||||
captcha-reverb:
|
captcha-reverb:
|
||||||
image: korelf/service-captcha:0.8.2
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -62,7 +54,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${DOCKER_CAPTCHA_WEBSOCKET_PORT}:9000
|
- ${DOCKER_CAPTCHA_WEBSOCKET_PORT}:9000
|
||||||
captcha-scheduler:
|
captcha-scheduler:
|
||||||
image: korelf/service-captcha:0.8.2
|
image: korelf/service-captcha:0.8.1
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -73,8 +65,6 @@ services:
|
|||||||
captcha-redis:
|
captcha-redis:
|
||||||
image: redis:3.0-alpine
|
image: redis:3.0-alpine
|
||||||
# restart: always
|
# restart: always
|
||||||
volumes:
|
|
||||||
- ./captcha-app/redis/data:/data
|
|
||||||
db:
|
db:
|
||||||
image: docker.io/mysql:8.0.33
|
image: docker.io/mysql:8.0.33
|
||||||
command: --default-authentication-plugin=mysql_native_password
|
command: --default-authentication-plugin=mysql_native_password
|
||||||
|
@ -15,8 +15,6 @@ services:
|
|||||||
- ./app/application:/var/www/html
|
- ./app/application:/var/www/html
|
||||||
app-redis:
|
app-redis:
|
||||||
image: redis:3.0-alpine
|
image: redis:3.0-alpine
|
||||||
volumes:
|
|
||||||
- ./redis/data:/data
|
|
||||||
|
|
||||||
captcha-app:
|
captcha-app:
|
||||||
image: korelf/service-captcha:0.8.1
|
image: korelf/service-captcha:0.8.1
|
||||||
@ -64,8 +62,6 @@ services:
|
|||||||
env_file: captcha-app/.env
|
env_file: captcha-app/.env
|
||||||
captcha-redis:
|
captcha-redis:
|
||||||
image: redis:3.0-alpine
|
image: redis:3.0-alpine
|
||||||
volumes:
|
|
||||||
- ./captcha-app/redis/data:/data
|
|
||||||
db:
|
db:
|
||||||
image: docker.io/mysql:8.0.33
|
image: docker.io/mysql:8.0.33
|
||||||
command: --default-authentication-plugin=mysql_native_password
|
command: --default-authentication-plugin=mysql_native_password
|
||||||
|
1
redis/.gitignore
vendored
1
redis/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
data/
|
|
Loading…
Reference in New Issue
Block a user