rht
This commit is contained in:
parent
0959e43b20
commit
7e79e8aca2
|
@ -41,12 +41,11 @@ export class InitService {
|
|||
|
||||
const existingTaxonomies = await db.taxonomy.findMany();
|
||||
const existingTaxonomyMap = new Map(
|
||||
existingTaxonomies.map((taxonomy) => [taxonomy.name, taxonomy]),
|
||||
existingTaxonomies.map((taxonomy) => [taxonomy.slug, taxonomy]),
|
||||
);
|
||||
|
||||
for (const [index, taxonomy] of InitTaxonomies.entries()) {
|
||||
const existingTaxonomy = existingTaxonomyMap.get(taxonomy.name);
|
||||
|
||||
const existingTaxonomy = existingTaxonomyMap.get(taxonomy.slug);
|
||||
if (!existingTaxonomy) {
|
||||
// Create new taxonomy
|
||||
await db.taxonomy.create({
|
||||
|
|
|
@ -14,7 +14,7 @@ done
|
|||
# Check if the index.html file exists before processing
|
||||
if [ -f "/usr/share/nginx/html/index.html" ]; then
|
||||
# Use envsubst to replace environment variable placeholders
|
||||
envsubst < /usr/share/nginx/html/index.html > /usr/share/nginx/html/index.html.tmp
|
||||
envsubst < /usr/share/nginx/html/index.temp > /usr/share/nginx/html/index.html.tmp
|
||||
mv /usr/share/nginx/html/index.html.tmp /usr/share/nginx/html/index.html
|
||||
else
|
||||
echo "Info: /usr/share/nginx/html/index.html does not exist , skip replace env"
|
||||
|
|
Loading…
Reference in New Issue