Работа над контейнером docker
Изменения в конфигах nginx Добавил привязку сервисов к 1 адресу
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { createApp, h } from 'vue'
|
||||
import { createInertiaApp, router } from '@inertiajs/vue3'
|
||||
import {createInertiaApp, router, usePage} from '@inertiajs/vue3'
|
||||
import {createPinia} from "pinia";
|
||||
import {setupNaiveDiscreteApi} from "./Plugins/NaiveUI.js";
|
||||
import * as Sentry from "@sentry/vue";
|
||||
@@ -8,9 +8,12 @@ import './bootstrap';
|
||||
import '../css/app.css';
|
||||
import {NConfigProvider, NDialogProvider, NMessageProvider, ruRU, dateRuRU, darkTheme} from "naive-ui";
|
||||
import { ZiggyVue } from 'ziggy-js';
|
||||
import {browserTracingIntegration} from "@sentry/vue";
|
||||
|
||||
router.on('start', () => {
|
||||
router.on('start', (event) => {
|
||||
startGlobalLoading()
|
||||
Sentry.setTag('route', event.detail.visit?.component || 'unknown');
|
||||
Sentry.setTag('url', window.location.href);
|
||||
})
|
||||
|
||||
router.on('finish', () => {
|
||||
@@ -21,8 +24,11 @@ router.on('invalid', () => {
|
||||
stopGlobalLoading()
|
||||
})
|
||||
|
||||
router.on('exception', () => {
|
||||
router.on('exception', (event) => {
|
||||
stopGlobalLoading()
|
||||
if (event.error) {
|
||||
Sentry.captureException(event.error);
|
||||
}
|
||||
})
|
||||
|
||||
const themeOverrides = {
|
||||
@@ -41,6 +47,16 @@ const themeOverrides = {
|
||||
},
|
||||
}
|
||||
|
||||
// Получаем ключ и ID из мета-тегов
|
||||
const keyMeta = document.querySelector('meta[name="sentry-key"]');
|
||||
const idMeta = document.querySelector('meta[name="sentry-id"]');
|
||||
const sentryKey = keyMeta ? keyMeta.getAttribute('content') : '';
|
||||
const sentryId = idMeta ? idMeta.getAttribute('content') : '';
|
||||
|
||||
const dsn = sentryKey && sentryId
|
||||
? `${window.location.protocol}//${sentryKey}@${window.location.host}/sentry/${sentryId}`
|
||||
: ''
|
||||
|
||||
createInertiaApp({
|
||||
id: 'onboard',
|
||||
resolve: name => {
|
||||
@@ -71,21 +87,21 @@ createInertiaApp({
|
||||
|
||||
setupNaiveDiscreteApi(vueApp)
|
||||
|
||||
// Sentry.init({
|
||||
// vueApp,
|
||||
// dsn: import.meta.env.VITE_SENTRY_DNS,
|
||||
// // Setting this option to true will send default PII data to Sentry.
|
||||
// // For example, automatic IP address collection on events
|
||||
// sendDefaultPii: true,
|
||||
// integrations: [
|
||||
// Sentry.replayIntegration()
|
||||
// ],
|
||||
// // Session Replay
|
||||
// replaysSessionSampleRate: 0, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
||||
// replaysOnErrorSampleRate: 0.5, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.,
|
||||
// // Logs
|
||||
// enableLogs: true
|
||||
// });
|
||||
Sentry.init({
|
||||
vueApp,
|
||||
dsn: dsn,
|
||||
// Setting this option to true will send default PII data to Sentry.
|
||||
// For example, automatic IP address collection on events
|
||||
sendDefaultPii: true,
|
||||
integrations: [
|
||||
Sentry.replayIntegration(),
|
||||
],
|
||||
// Session Replay
|
||||
replaysSessionSampleRate: 0, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
||||
replaysOnErrorSampleRate: 0.5, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.,
|
||||
// Logs
|
||||
enableLogs: true
|
||||
});
|
||||
|
||||
vueApp.mount(el)
|
||||
},
|
||||
|
||||
8
resources/js/bootstrap.js
vendored
8
resources/js/bootstrap.js
vendored
@@ -12,10 +12,10 @@ const MAX_REVERB_FAILS = 3;
|
||||
window.Echo = new Echo({
|
||||
broadcaster: 'reverb',
|
||||
key: window.reverb.key,
|
||||
wsHost: window.reverb.host,
|
||||
wsPort: window.reverb.port ?? 8080,
|
||||
wssPort: window.reverb.port ?? 8080,
|
||||
forceTLS: (window.reverb.scheme ?? 'http') === 'https',
|
||||
wsHost: window.location.hostname,
|
||||
wsPort: window.location.port,
|
||||
wssPort: window.location.port,
|
||||
forceTLS: window.location.protocol === 'https:',
|
||||
enabledTransports: ['ws', 'wss'],
|
||||
withCredentials: true,
|
||||
});
|
||||
|
||||
@@ -3,15 +3,14 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="sentry-key" content="{{ config('vue.sentry.dsn') }}">
|
||||
<meta name="sentry-id" content="{{ config('vue.sentry.id') }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<script>
|
||||
window.reverb = {
|
||||
key: "{{ env('REVERB_APP_KEY') }}",
|
||||
host: "{{ env('REVERB_APP_HOST') }}",
|
||||
port: "{{ env('REVERB_APP_PORT') }}",
|
||||
scheme: "{{ env('REVERB_APP_SCHEME') }}",
|
||||
key: "{{ config('reverb.apps.apps.0.key') }}",
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user