feat(deploy): production deployment setup and fixes

- Debian-based api image (bookworm-slim), docker/debian mirrors, prisma
  binaryTargets for openssl 3.0
- nginx: admin SPA under /admin, TLS via acme.sh (ZeroSSL) + auto-renewal
  cron, http->https redirect
- prisma: add origin_goods.delisted migration, sync missing schema
  (good_image/tag_font_color/good_tags), fix users.createdAt Timestamptz
- api: CORS wildcard reflection, helmet CORP cross-origin, price
  backfill in persistProductDetail, categoryIcon ancestor fallback,
  mediaByColor per-color gallery in public goods detail
- admin: /admin base path (vite + router)
- import-data.mjs: udt_name casting, serial sequence advance fix
This commit is contained in:
yeuimu
2026-08-26 14:23:09 +08:00
parent be0b90e68f
commit 6c61a4e871
982 changed files with 74156 additions and 179393 deletions
+19 -19
View File
@@ -1,19 +1,19 @@
import { mount } from '@vue/test-utils';
import { describe, expect, it } from 'vitest';
import ProductCard from '../app/components/product/ProductCard.vue';
import type { Product } from '../app/composables/useProductCenter';
describe('ProductCard', () => {
it('links the entire product card to its Inkpod detail page', () => {
const product: Product = {
id: '12345', name: '测试商品', priority: 0, image: null, price: '28',
country: { id: '1', name: '美国', icon: null },
category: { id: '2', name: 'T恤', icon: null, parentId: null, children: [] },
tag: null, tags: [],
};
const wrapper = mount(ProductCard, { props: { product } });
const link = wrapper.get('a.product-card');
expect(link.attributes('href')).toBe('https://inkpod.vip/portal/detail/12345');
expect(link.attributes('target')).toBeUndefined();
});
});
import { mount } from '@vue/test-utils';
import { describe, expect, it } from 'vitest';
import ProductCard from '../app/components/product/ProductCard.vue';
import type { Product } from '../app/composables/useProductCenter';
describe('ProductCard', () => {
it('links the entire product card to its Inkpod detail page', () => {
const product: Product = {
id: '12345', name: '测试商品', priority: 0, image: null, price: '28',
country: { id: '1', name: '美国', icon: null },
category: { id: '2', name: 'T恤', icon: null, parentId: null, children: [] },
tag: null, tags: [],
};
const wrapper = mount(ProductCard, { props: { product } });
const link = wrapper.get('a.product-card');
expect(link.attributes('href')).toBe('https://inkpod.vip/portal/detail/12345');
expect(link.attributes('target')).toBeUndefined();
});
});