Skip to content

Commit

Permalink
Fix wrong env naming
Browse files Browse the repository at this point in the history
Add log for cases when s3 cred dont entered fully
Fix displaying img problem
  • Loading branch information
igor.la committed Nov 13, 2024
1 parent c764a52 commit 9ea053c
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 4 deletions.
5 changes: 5 additions & 0 deletions backend/src/config/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ export const isStorageSetupFull =
vars.s3.secrets.secretAccessKey !== '' &&
vars.s3.secrets.accessKeyId !== '';

if (!isStorageSetupFull) {
// eslint-disable-next-line no-console
console.log('S3 credentials not entered correctly');
}

export const s3Client = new S3Client({
region: vars.s3.region,
endpoint: vars.s3.endpoint,
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.demo.new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ services:
- GA_API_SECRET
- GA_MEASUREMENT_ID
- S3_ACCESS_KEY_ID
- S3_ACCESS_SECRET_KEY
- S3_SECRET_ACCESS_KEY
- S3_REGION
- S3_BUCKET
- S3_ENDPOINT
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ services:
- FRONTEND_URL=http://127.0.0.1
- MONGO_URI=mongodb://mongo:27017/dev
- NUXT_PUBLIC_GOOGLE_SIGN_IN_CLIENT_ID
- S3_ACCESS_KEY_ID
- S3_SECRET_ACCESS_KEY
- S3_REGION
- S3_BUCKET
- S3_ENDPOINT
ports:
- '7080:7080'
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.prod.new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ services:
- GA_API_SECRET
- GA_MEASUREMENT_ID
- S3_ACCESS_KEY_ID
- S3_ACCESS_SECRET_KEY
- S3_SECRET_ACCESS_KEY
- S3_REGION
- S3_BUCKET
- S3_ENDPOINT
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.test.new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ services:
- GA_API_SECRET
- GA_MEASUREMENT_ID
- S3_ACCESS_KEY_ID
- S3_ACCESS_SECRET_KEY
- S3_SECRET_ACCESS_KEY
- S3_REGION
- S3_BUCKET
- S3_ENDPOINT
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ services:
environment:
- FRONTEND_URL=http://127.0.0.1
- MONGO_URI=mongodb://mongo:27017/dev
- S3_ACCESS_KEY_ID
- S3_SECRET_ACCESS_KEY
- S3_REGION
- S3_BUCKET
- S3_ENDPOINT
ports:
- '7080:7080'
develop:
Expand Down
6 changes: 5 additions & 1 deletion frontend/components/common/ImageLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ const emit = defineEmits(['update:model-value']);
const input = ref<HTMLInputElement>();
const errorLoad = ref('');
const imageSrc = computed(() =>
props.externalImage ? `${config.public.baseUrl}${props.externalImage}` : ''
props.externalImage
? props.externalImage.includes('http')
? props.externalImage
: `${config.public.baseUrl}${props.externalImage}`
: ''
);
const loadImage = async (event: Event) => {
Expand Down

0 comments on commit 9ea053c

Please sign in to comment.