mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Follow @roschaefer PR review suggestions
- Update seed file with more human readable imageAspectRatios - Remove copy script from Dockerfile to not expose to others. we'll need to either start a maintenance server, so it has access to both the backend/public/uploads and cypher-shell, or copy a script to the backend that creates a csv, which can be copied to the neo4j pod and then loaded into the cypher. - Remove unintended changes to deployment/legacy-migration - Add back image compression to Post images
This commit is contained in:
parent
c75c8c6d2d
commit
66f1aa8888
@ -25,5 +25,4 @@ ENV NODE_ENV=production
|
|||||||
COPY --from=build-and-test /nitro-backend/dist ./dist
|
COPY --from=build-and-test /nitro-backend/dist ./dist
|
||||||
COPY ./public/img/ ./public/img/
|
COPY ./public/img/ ./public/img/
|
||||||
COPY ./public/providers.json ./public/providers.json
|
COPY ./public/providers.json ./public/providers.json
|
||||||
COPY ./public/add_image_aspect_ratio.sh ./public/add_image_aspect_ratio.sh
|
|
||||||
RUN yarn install --production=true --frozen-lockfile --non-interactive --no-cache
|
RUN yarn install --production=true --frozen-lockfile --non-interactive --no-cache
|
||||||
|
|||||||
@ -352,7 +352,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
language: sample(languages),
|
language: sample(languages),
|
||||||
image: faker.image.unsplash.food(300, 169),
|
image: faker.image.unsplash.food(300, 169),
|
||||||
categoryIds: ['cat16'],
|
categoryIds: ['cat16'],
|
||||||
imageAspectRatio: 1.777,
|
imageAspectRatio: 300 / 169,
|
||||||
}),
|
}),
|
||||||
factory.create('Post', {
|
factory.create('Post', {
|
||||||
author: bobDerBaumeister,
|
author: bobDerBaumeister,
|
||||||
@ -360,7 +360,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
language: sample(languages),
|
language: sample(languages),
|
||||||
image: faker.image.unsplash.technology(300, 1500),
|
image: faker.image.unsplash.technology(300, 1500),
|
||||||
categoryIds: ['cat1'],
|
categoryIds: ['cat1'],
|
||||||
imageAspectRatio: 0.2,
|
imageAspectRatio: 300 / 1500,
|
||||||
}),
|
}),
|
||||||
factory.create('Post', {
|
factory.create('Post', {
|
||||||
author: huey,
|
author: huey,
|
||||||
@ -386,7 +386,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
language: sample(languages),
|
language: sample(languages),
|
||||||
image: faker.image.unsplash.buildings(300, 857),
|
image: faker.image.unsplash.buildings(300, 857),
|
||||||
categoryIds: ['cat6'],
|
categoryIds: ['cat6'],
|
||||||
imageAspectRatio: 0.35,
|
imageAspectRatio: 300 / 857,
|
||||||
}),
|
}),
|
||||||
factory.create('Post', {
|
factory.create('Post', {
|
||||||
author: huey,
|
author: huey,
|
||||||
@ -405,7 +405,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
language: sample(languages),
|
language: sample(languages),
|
||||||
image: faker.image.unsplash.people(300, 901),
|
image: faker.image.unsplash.people(300, 901),
|
||||||
categoryIds: ['cat11'],
|
categoryIds: ['cat11'],
|
||||||
imageAspectRatio: 0.333,
|
imageAspectRatio: 300 / 901,
|
||||||
}),
|
}),
|
||||||
factory.create('Post', {
|
factory.create('Post', {
|
||||||
author: bobDerBaumeister,
|
author: bobDerBaumeister,
|
||||||
@ -419,7 +419,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
language: sample(languages),
|
language: sample(languages),
|
||||||
image: faker.image.unsplash.objects(300, 200),
|
image: faker.image.unsplash.objects(300, 200),
|
||||||
categoryIds: ['cat14'],
|
categoryIds: ['cat14'],
|
||||||
imageAspectRatio: 1.5,
|
imageAspectRatio: 300 / 450,
|
||||||
}),
|
}),
|
||||||
factory.create('Post', {
|
factory.create('Post', {
|
||||||
author: huey,
|
author: huey,
|
||||||
@ -466,7 +466,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
title: `Nature Philosophy Yoga`,
|
title: `Nature Philosophy Yoga`,
|
||||||
content: hashtag1,
|
content: hashtag1,
|
||||||
categoryIds: ['cat2'],
|
categoryIds: ['cat2'],
|
||||||
imageAspectRatio: 0.66,
|
imageAspectRatio: 300 / 200,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
mutate({
|
mutate({
|
||||||
@ -476,7 +476,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
title: 'This is post #7',
|
title: 'This is post #7',
|
||||||
content: `${mention1} ${faker.lorem.paragraph()}`,
|
content: `${mention1} ${faker.lorem.paragraph()}`,
|
||||||
categoryIds: ['cat7'],
|
categoryIds: ['cat7'],
|
||||||
imageAspectRatio: 1.66,
|
imageAspectRatio: 300 / 180,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
mutate({
|
mutate({
|
||||||
@ -487,7 +487,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
title: `Quantum Flow Theory explains Quantum Gravity`,
|
title: `Quantum Flow Theory explains Quantum Gravity`,
|
||||||
content: hashtagAndMention1,
|
content: hashtagAndMention1,
|
||||||
categoryIds: ['cat8'],
|
categoryIds: ['cat8'],
|
||||||
imageAspectRatio: 0.3,
|
imageAspectRatio: 300 / 900,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
mutate({
|
mutate({
|
||||||
@ -497,7 +497,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
title: 'This is post #12',
|
title: 'This is post #12',
|
||||||
content: `${mention2} ${faker.lorem.paragraph()}`,
|
content: `${mention2} ${faker.lorem.paragraph()}`,
|
||||||
categoryIds: ['cat12'],
|
categoryIds: ['cat12'],
|
||||||
imageAspectRatio: 1.5,
|
imageAspectRatio: 300 / 200,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
|
|||||||
@ -12,6 +12,6 @@
|
|||||||
# On Windows this resolves to C:\Users\dornhoeschen\AppData\Local\Temp\mongo-export (MinGW)
|
# On Windows this resolves to C:\Users\dornhoeschen\AppData\Local\Temp\mongo-export (MinGW)
|
||||||
EXPORT_PATH='/tmp/mongo-export/'
|
EXPORT_PATH='/tmp/mongo-export/'
|
||||||
EXPORT_MONGOEXPORT_BIN='mongoexport'
|
EXPORT_MONGOEXPORT_BIN='mongoexport'
|
||||||
MONGO_EXPORT_SPLIT_SIZE=500000
|
MONGO_EXPORT_SPLIT_SIZE=6000
|
||||||
# On Windows use something like this
|
# On Windows use something like this
|
||||||
# EXPORT_MONGOEXPORT_BIN='C:\Program Files\MongoDB\Server\3.6\bin\mongoexport.exe'
|
# EXPORT_MONGOEXPORT_BIN='C:\Program Files\MongoDB\Server\3.6\bin\mongoexport.exe'
|
||||||
|
|||||||
@ -39,7 +39,6 @@ function import_collection () {
|
|||||||
echo "Import $1 ${CHUNK_FILE_NAME} (${chunk})"
|
echo "Import $1 ${CHUNK_FILE_NAME} (${chunk})"
|
||||||
echo "${NEO4J_COMMAND}" | "${IMPORT_CYPHERSHELL_BIN}" > /dev/null
|
echo "${NEO4J_COMMAND}" | "${IMPORT_CYPHERSHELL_BIN}" > /dev/null
|
||||||
# add file to array and file
|
# add file to array and file
|
||||||
echo "$IMPORT_CHUNK_PATH_CQL_FILE"
|
|
||||||
IMPORT_INDEX+=("${CHUNK_FILE_NAME}")
|
IMPORT_INDEX+=("${CHUNK_FILE_NAME}")
|
||||||
echo "${CHUNK_FILE_NAME}" >> ${INDEX_FILE}
|
echo "${CHUNK_FILE_NAME}" >> ${INDEX_FILE}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -118,7 +118,7 @@ export default {
|
|||||||
const croppedImageFile = new File([blob], this.file.name, { type: this.file.type })
|
const croppedImageFile = new File([blob], this.file.name, { type: this.file.type })
|
||||||
this.$emit('addTeaserImage', croppedImageFile)
|
this.$emit('addTeaserImage', croppedImageFile)
|
||||||
this.$emit('addImageAspectRatio', imageAspectRatio)
|
this.$emit('addImageAspectRatio', imageAspectRatio)
|
||||||
})
|
}, 'image/jpeg')
|
||||||
},
|
},
|
||||||
setupPreview(canvas) {
|
setupPreview(canvas) {
|
||||||
this.image = new Image()
|
this.image = new Image()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user