mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +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 ./public/img/ ./public/img/
|
||||
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
|
||||
|
||||
@ -352,7 +352,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
language: sample(languages),
|
||||
image: faker.image.unsplash.food(300, 169),
|
||||
categoryIds: ['cat16'],
|
||||
imageAspectRatio: 1.777,
|
||||
imageAspectRatio: 300 / 169,
|
||||
}),
|
||||
factory.create('Post', {
|
||||
author: bobDerBaumeister,
|
||||
@ -360,7 +360,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
language: sample(languages),
|
||||
image: faker.image.unsplash.technology(300, 1500),
|
||||
categoryIds: ['cat1'],
|
||||
imageAspectRatio: 0.2,
|
||||
imageAspectRatio: 300 / 1500,
|
||||
}),
|
||||
factory.create('Post', {
|
||||
author: huey,
|
||||
@ -386,7 +386,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
language: sample(languages),
|
||||
image: faker.image.unsplash.buildings(300, 857),
|
||||
categoryIds: ['cat6'],
|
||||
imageAspectRatio: 0.35,
|
||||
imageAspectRatio: 300 / 857,
|
||||
}),
|
||||
factory.create('Post', {
|
||||
author: huey,
|
||||
@ -405,7 +405,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
language: sample(languages),
|
||||
image: faker.image.unsplash.people(300, 901),
|
||||
categoryIds: ['cat11'],
|
||||
imageAspectRatio: 0.333,
|
||||
imageAspectRatio: 300 / 901,
|
||||
}),
|
||||
factory.create('Post', {
|
||||
author: bobDerBaumeister,
|
||||
@ -419,7 +419,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
language: sample(languages),
|
||||
image: faker.image.unsplash.objects(300, 200),
|
||||
categoryIds: ['cat14'],
|
||||
imageAspectRatio: 1.5,
|
||||
imageAspectRatio: 300 / 450,
|
||||
}),
|
||||
factory.create('Post', {
|
||||
author: huey,
|
||||
@ -466,7 +466,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
title: `Nature Philosophy Yoga`,
|
||||
content: hashtag1,
|
||||
categoryIds: ['cat2'],
|
||||
imageAspectRatio: 0.66,
|
||||
imageAspectRatio: 300 / 200,
|
||||
},
|
||||
}),
|
||||
mutate({
|
||||
@ -476,7 +476,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
title: 'This is post #7',
|
||||
content: `${mention1} ${faker.lorem.paragraph()}`,
|
||||
categoryIds: ['cat7'],
|
||||
imageAspectRatio: 1.66,
|
||||
imageAspectRatio: 300 / 180,
|
||||
},
|
||||
}),
|
||||
mutate({
|
||||
@ -487,7 +487,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
title: `Quantum Flow Theory explains Quantum Gravity`,
|
||||
content: hashtagAndMention1,
|
||||
categoryIds: ['cat8'],
|
||||
imageAspectRatio: 0.3,
|
||||
imageAspectRatio: 300 / 900,
|
||||
},
|
||||
}),
|
||||
mutate({
|
||||
@ -497,7 +497,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
title: 'This is post #12',
|
||||
content: `${mention2} ${faker.lorem.paragraph()}`,
|
||||
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)
|
||||
EXPORT_PATH='/tmp/mongo-export/'
|
||||
EXPORT_MONGOEXPORT_BIN='mongoexport'
|
||||
MONGO_EXPORT_SPLIT_SIZE=500000
|
||||
MONGO_EXPORT_SPLIT_SIZE=6000
|
||||
# On Windows use something like this
|
||||
# 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 "${NEO4J_COMMAND}" | "${IMPORT_CYPHERSHELL_BIN}" > /dev/null
|
||||
# add file to array and file
|
||||
echo "$IMPORT_CHUNK_PATH_CQL_FILE"
|
||||
IMPORT_INDEX+=("${CHUNK_FILE_NAME}")
|
||||
echo "${CHUNK_FILE_NAME}" >> ${INDEX_FILE}
|
||||
else
|
||||
|
||||
@ -118,7 +118,7 @@ export default {
|
||||
const croppedImageFile = new File([blob], this.file.name, { type: this.file.type })
|
||||
this.$emit('addTeaserImage', croppedImageFile)
|
||||
this.$emit('addImageAspectRatio', imageAspectRatio)
|
||||
})
|
||||
}, 'image/jpeg')
|
||||
},
|
||||
setupPreview(canvas) {
|
||||
this.image = new Image()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user