Skip to content

Instantly share code, notes, and snippets.

@aybasaran
Last active December 10, 2023 03:10
Show Gist options
  • Save aybasaran/fb5b36cf4e204bc8d589aab62c1c413b to your computer and use it in GitHub Desktop.
Save aybasaran/fb5b36cf4e204bc8d589aab62c1c413b to your computer and use it in GitHub Desktop.
Strapi Example Env file and plugins.js for Postgres and MinIO (@strapi/provider-upload-aws-s3)
HOST=0.0.0.0
PORT=1337
JWT_SECRET=tobemodified
APP_KEYS=tobemodified,tobemodified,tobemodified,tobemodified
API_TOKEN_SALT=tobemodified
ADMIN_JWT_SECRET=tobemodified
TRANSFER_TOKEN_SALT=tobemodified
# Database
DATABASE_CLIENT=postgres
DATABASE_HOST=tobemodified # My Postgres Deployed on Debian 12 using CapRover (used port mapping 5432:5432)
DATABASE_PORT=5432
DATABASE_NAME=tobemodified
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=tobemodified
DATABASE_SSL=false
# Minio
MINIO_ENDPOINT=https://bucket.domain.com # My Minio Deployed on Debian 12 using CapRover
MINIO_ACCESS_KEY_ID=tobemodified
MINIO_ACCESS_SECRET=tobemodified
MINIO_BUCKET=tobemodified
MINIO_REGION=us-east-1 # MinIo region default might be us-east-1
module.exports = ({ env }) => ({
upload: {
config: {
provider: "aws-s3",
providerOptions: {
s3Options: {
accessKeyId: env("MINIO_ACCESS_KEY_ID"),
secretAccessKey: env("MINIO_ACCESS_SECRET"),
endpoint: env("MINIO_ENDPOINT"),
region: env("MINIO_REGION"),
forcePathStyle: true,
params: {
Bucket: env("MINIO_BUCKET"),
},
},
},
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment