Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

Merge branch 'main' into feature/media-uploader

James Readd7ff7dd794e5
diff --cc .env.example
index 94469552a,5b70c78c2..767a6ac12
--- a/.env.example
+++ b/.env.example
@@@ -1,17 -1,42 +1,45 @@@
- DATABASE_URL=""
- REDIS_URL=""
- UPLOAD_DIRECTORY=""
- NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY=""
- NEXT_PUBLIC_STORAGE_PROVIDER="local or cloudflare //default is local"
- STORAGE_PROVIDER="local or cloudflare //default is local"
- STRIPE_PUBLISHABLE_KEY=""
- STRIPE_SECRET_KEY=""
- STRIPE_SIGNING_KEY=""
- JWT_SECRET=""
- FRONTEND_URL=""
- MAIN_URL=""
- NEXT_PUBLIC_BACKEND_URL=""
- BACKEND_INTERNAL_URL=""
+ # Configuration reference: http://docs.postiz.com/configuration/reference
+
+ # === Required Settings
+ DATABASE_URL="postgresql://postiz-user:postiz-password@localhost:5432/postiz-db-local"
+ REDIS_URL="redis://localhost:6379"
+ JWT_SECRET="random string for your JWT secret, make it long"
+ FRONTEND_URL="http://localhost:4200"
+ NEXT_PUBLIC_BACKEND_URL="http://localhost:3000"
+ BACKEND_INTERNAL_URL="http://localhost:3000"
+
+ ## These are dummy values, you must create your own from Cloudflare.
+ ## Remember to set your public internet IP address in the allow-list for the API token.
+ ##
+ ## Cloudflare is currently required to save things like social media avatars for accounts.
+ CLOUDFLARE_ACCOUNT_ID="QhcMSXQyPuMCRpSQcSYdEuTYgHeCXHbu"
+ CLOUDFLARE_ACCESS_KEY="dcfCMSuFEeCNfvByUureMZEfxWJmDqZe"
+ CLOUDFLARE_SECRET_ACCESS_KEY="zTTMXBmtyLPwHEdpACGHgDgzRTNpTJewiNriLnUS"
+ CLOUDFLARE_BUCKETNAME="postiz"
+ CLOUDFLARE_BUCKET_URL="https://QhcMSXQyPuMCRpSQcSYdEuTYgHeCXHbu.r2.cloudflarestorage.com/"
+ CLOUDFLARE_REGION="auto"
+
+
+ # === Common optional Settings
+
+ ## This is a dummy key, you must create your own from Resend.
+ ## If this variable exists, user activation is required.
+ ## If it is commented out, users are activated automatically.
+ #RESEND_API_KEY="RzeTwHijvxvPUerScFcenUZUALuQJzSaGSMJ"
+ #EMAIL_FROM_ADDRESS=""
+ #EMAIL_FROM_NAME=""
+
++# Where will social media icons be saved - local or cloudflare.
++STORAGE_PROVIDER="local"
++
+ # Your upload directory path if you host your files locally, otherwise Cloudflare will be used.
-#UPLOAD_DIRECTORY="/opt/postiz/uploads/"
++#UPLOAD_DIRECTORY=""
+
+ # Your upload directory path if you host your files locally, otherwise Cloudflare will be used.
-#NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY="/opt/postiz/uploads/"
++#NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY=""
+
+
+ # Social Media API Settings
X_API_KEY=""
X_API_SECRET=""
X_CLIENT=""
diff --cc libraries/react-shared-libraries/src/helpers/use.media.directory.ts
index 042a4e4d8,7a989f265..7d35fe983
--- a/libraries/react-shared-libraries/src/helpers/use.media.directory.ts
+++ b/libraries/react-shared-libraries/src/helpers/use.media.directory.ts
@@@ -5,8 -7,7 +7,9 @@@ export const useMediaDirectory = () =>
if (path.indexOf('https') === 0) {
return path;
}
- return `${backendUrl}/${uploadDirectory}${path}`;
++
+ const urlWithoutPort = process.env.NEXT_PUBLIC_BACKEND_URL!.split(':').slice(0, 2).join(':');
+ return `${urlWithoutPort}/${path}`;
}, []);
return {