chore: add Umami analytics and adjust docker-compose ports

Inject Umami analytics script into frontend index.html
Map backend port to 20016 and remove exposed postgres port
This commit is contained in:
2026-05-03 19:14:57 +08:00
parent fcb9b57aa3
commit 72ddae6f9d
2 changed files with 15 additions and 5 deletions

View File

@@ -5,8 +5,6 @@ services:
POSTGRES_DB: pokopia
POSTGRES_USER: pokopia
POSTGRES_PASSWORD: pokopia
ports:
- "5432:5432"
volumes:
- postgres18_data:/var/lib/postgresql
healthcheck:
@@ -26,11 +24,11 @@ services:
FRONTEND_ORIGIN: http://localhost:20015
APP_ORIGIN: http://localhost:20015
UPLOAD_DIR: /app/uploads
BACKEND_PUBLIC_ORIGIN: http://localhost:3001
BACKEND_PUBLIC_ORIGIN: http://localhost:20016
RESEND_API_KEY: ${RESEND_API_KEY:-}
EMAIL_FROM: "${EMAIL_FROM:-Pokopia Wiki <onboarding@resend.dev>}"
ports:
- "3001:3001"
- "20016:3001"
volumes:
- backend_uploads:/app/uploads
depends_on:
@@ -42,7 +40,7 @@ services:
context: .
dockerfile: frontend/Dockerfile
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:3001}
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:20016}
VITE_SITE_URL: ${VITE_SITE_URL:-https://pokopiawiki.tootaio.com}
environment:
PORT: 20015

View File

@@ -28,6 +28,18 @@
content="Browse Pokopia Wiki for Pokemon, habitats, items, recipes, daily tasks, and Life community posts for Pokemon Pokopia."
/>
<meta name="twitter:image" content="%POKOPIA_SITE_URL%/seo/pokopia-hero.jpg" />
<script>
(function () {
const UMAMI_SCRIPT_JS = "https://umami.tootaio.com/script.js";
const UMAMI_ID = "6c00a2e5-dc72-41f3-9d5d-aac93aaaf1cb";
var script = document.createElement("script");
script.async = true;
script.src = UMAMI_SCRIPT_JS;
script.setAttribute("data-website-id", UMAMI_ID);
document.head.appendChild(script);
})();
</script>
<title>Pokopia Wiki - Pokemon Pokopia Guide</title>
</head>
<body>