feat: replace rustrak with glitchtip
This commit is contained in:
+1
-4
@@ -76,11 +76,8 @@ void main() async {
|
||||
|
||||
await SentryFlutter.init(
|
||||
(options) {
|
||||
options.dsn = 'https://642fadfae16a4308a73ae2db1181654a@bugs.plezy.app/1';
|
||||
options.sendDefaultPii = true;
|
||||
options.dsn = 'https://6a1a6ef8c72140099b2798973c1bfb2f@bugs.plezy.app/1';
|
||||
options.tracesSampleRate = 0;
|
||||
options.anrEnabled = true;
|
||||
options.anrTimeoutInterval = const Duration(seconds: 5);
|
||||
options.attachStacktrace = true;
|
||||
options.enableAutoSessionTracking = false;
|
||||
options.beforeSend = _beforeSend;
|
||||
|
||||
@@ -996,13 +996,25 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
|
||||
ListTile(
|
||||
leading: const AppIcon(Symbols.error_rounded, fill: 1),
|
||||
title: const Text('Test Sentry'),
|
||||
subtitle: const Text('Send a test error to Bugsink'),
|
||||
subtitle: const Text('Send a test error'),
|
||||
trailing: const AppIcon(Symbols.chevron_right_rounded, fill: 1),
|
||||
onTap: () {
|
||||
Sentry.captureException(Exception('Sentry test from settings'));
|
||||
throw Exception("Example exception");
|
||||
showSnackBar(context, 'Test error sent to Sentry');
|
||||
},
|
||||
),
|
||||
if (kDebugMode)
|
||||
ListTile(
|
||||
leading: const AppIcon(Symbols.timer_rounded, fill: 1),
|
||||
title: const Text('Test ANR'),
|
||||
subtitle: const Text('Block the main thread for 10 seconds'),
|
||||
trailing: const AppIcon(Symbols.chevron_right_rounded, fill: 1),
|
||||
onTap: () {
|
||||
showSnackBar(context, 'Blocking main thread...');
|
||||
final end = DateTime.now().add(const Duration(seconds: 10));
|
||||
while (DateTime.now().isBefore(end)) {}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
+1
-8
@@ -3,12 +3,5 @@ ice.plezy.app {
|
||||
}
|
||||
|
||||
bugs.plezy.app {
|
||||
handle /api/* {
|
||||
reverse_proxy rustrak:8080 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
}
|
||||
handle {
|
||||
reverse_proxy rustrak-ui:3000
|
||||
}
|
||||
reverse_proxy glitchtip:8000
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ FROM golang:1.22-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
COPY main.go .
|
||||
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /relay .
|
||||
|
||||
FROM scratch
|
||||
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
REMOTE="root@212.132.75.249"
|
||||
SSH_KEY="$HOME/.ssh/id_edde"
|
||||
REMOTE_DIR="/opt/plezy-relay"
|
||||
SSH="ssh -i $SSH_KEY $REMOTE"
|
||||
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
echo "Syncing files to $REMOTE:$REMOTE_DIR..."
|
||||
rsync -avz --exclude='plezy-relay' --exclude='plezy-server-linux-amd64' \
|
||||
-e "ssh -i $SSH_KEY" \
|
||||
. "$REMOTE:$REMOTE_DIR/"
|
||||
|
||||
echo "Deploying..."
|
||||
$SSH "cd $REMOTE_DIR && docker compose up -d --build"
|
||||
|
||||
echo "Done."
|
||||
+19
-25
@@ -18,47 +18,41 @@ services:
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
|
||||
rustrak-db:
|
||||
glitchtip-db:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${RUSTRAK_POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${RUSTRAK_POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${RUSTRAK_POSTGRES_DB}
|
||||
POSTGRES_DB: glitchtip
|
||||
POSTGRES_USER: ${GLITCHTIP_POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${GLITCHTIP_POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- rustrak_data:/var/lib/postgresql/data
|
||||
- glitchtip_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${RUSTRAK_POSTGRES_USER}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${GLITCHTIP_POSTGRES_USER}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
rustrak:
|
||||
image: abians7/rustrak-server:latest
|
||||
glitchtip:
|
||||
image: glitchtip/glitchtip
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
rustrak-db:
|
||||
glitchtip-db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DATABASE_URL: postgres://${RUSTRAK_POSTGRES_USER}:${RUSTRAK_POSTGRES_PASSWORD}@rustrak-db/${RUSTRAK_POSTGRES_DB}
|
||||
RUSTRAK_LOG: ${RUSTRAK_LOG}
|
||||
SESSION_SECRET: ${RUSTRAK_SESSION_SECRET}
|
||||
CREATE_SUPERUSER: ${RUSTRAK_SUPERUSER}
|
||||
DATABASE_URL: postgres://${GLITCHTIP_POSTGRES_USER}:${GLITCHTIP_POSTGRES_PASSWORD}@glitchtip-db/glitchtip
|
||||
SECRET_KEY: ${GLITCHTIP_SECRET_KEY}
|
||||
GLITCHTIP_DOMAIN: https://bugs.plezy.app
|
||||
DEFAULT_FROM_EMAIL: noreply@plezy.app
|
||||
GLITCHTIP_MAX_EVENT_LIFE_DAYS: 90
|
||||
SERVER_ROLE: all_in_one
|
||||
ENABLE_USER_REGISTRATION: "false"
|
||||
VALKEY_URL: ""
|
||||
expose:
|
||||
- "8080"
|
||||
|
||||
rustrak-ui:
|
||||
image: abians7/rustrak-ui:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- rustrak
|
||||
environment:
|
||||
RUSTRAK_API_URL: http://rustrak:8080
|
||||
expose:
|
||||
- "3000"
|
||||
- "8000"
|
||||
|
||||
volumes:
|
||||
logs:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
rustrak_data:
|
||||
glitchtip_data:
|
||||
|
||||
Reference in New Issue
Block a user