feat: add db init
This commit is contained in:
parent
0ca9099d31
commit
5cf0e15e2d
|
@ -20,4 +20,10 @@ services:
|
|||
command: ["npm", "run", "melli-init"]
|
||||
volumes:
|
||||
- ./data/app.db:/app/prisma/dev.db
|
||||
profiles: ["mellisearch_init"]
|
||||
profiles: ["disabled"]
|
||||
db_init:
|
||||
build: .
|
||||
command: ["npm", "run", "db-init"]
|
||||
volumes:
|
||||
- ./data/app.db:/app/prisma/dev.db
|
||||
profiles: ["disabled"]
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range .Data.Posts }}
|
||||
{{- if .Permalink -}}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Language.LanguageCode }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Language.LanguageCode }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
</url>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
</urlset>
|
|
@ -18,6 +18,7 @@
|
|||
"typecheck": "tsc",
|
||||
"bridge": "bun run scripts/bridge.mts",
|
||||
"melli-init": "bun run scripts/melli-init.mts",
|
||||
"db-init": "prisma db push",
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in New Issue