Mixpost
-
On Cloudron the apps get all the addon service credentials and connection details as environment variables in the container. So just open a webterminal into the app instance and run
env
More info at https://docs.cloudron.io/packaging/addons/
-
@plusone-nick Are you using Mixpost Lite or Pro?
-
i am using pro
-
@nebulon I guess I am a bit confused as I am aware of the credentials.txt and see the Redis config but don't understand what "URL" or IP i should use.
Both SQL and Redis have their respective protocols in their URL: mysql:// and redis://
Am i supposed to use that URL for Redis vs the local Docker IP provided like for SQL? I kinda figured Redis would have an IP i could also use.
-
@plusone-nick The redis IP is dynamic, so you should connect to it by name. You can use the credentials in
/app/data/credentials.txt
(this is the same as the env vars). Does that not work? -
@girish Got horizon installed, but it soon kills as there is no schedule set. The Mixpost instructions advise setting a mixpost-horizon.conf in /etc/supervisor/conf.d but as you know its read only.
What is the best method to approach this?
-
EDIT: Apologies I got the Schedule going with the cron job... It's the Horizon/Supervisor config at /etc/supervisor/conf.d which is the last blocker
-
Go, Nick. Go!
-
@humptydumpty lol 🫡
Final update for now: got all services "UP" and "working"
BUT... - still need to have Horizon/Supervisor Config set as it only stays alive for a little, in that time I was able to push some posts through
Dwindled down from 38 to 7 errors – something regarding: Illuminate & Symfony
[2023-08-06 22:56:13] production.ERROR: Not enough arguments (missing: "name"). {"exception":"[object] (Symfony\Component\Console\Exception\RuntimeException(code: 0): Not enough arguments (missing: "name"). at /app/data/mixpost-pro-team-app/vendor/symfony/console/Input/Input.php:76)
[stacktrace]
#0 /app/data/mixpost-pro-team-app/vendor/symfony/console/Command/Command.php(321): Symfony\Component\Console\Input\Input->validate()
#1 /app/data/mixpost-pro-team-app/vendor/laravel/framework/src/Illuminate/Console/Command.php(181): Symfony\Component\Console\Command\Command->run()
#2 /app/data/mixpost-pro-team-app/vendor/symfony/console/Application.php(1081): Illuminate\Console\Command->run()
#3 /app/data/mixpost-pro-team-app/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand()
#4 /app/data/mixpost-pro-team-app/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun()
#5 /app/data/mixpost-pro-team-app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run()
#6 /app/data/mixpost-pro-team-app/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#7 {main}
"} -
@plusone-nick said in Mixpost:
[2023-08-06 22:56:13] production.ERROR: Not enough arguments (missing: "name"). {"exception":"[object] (Symfony\Component\Console\Exception\RuntimeException(code: 0): Not enough arguments (missing: "name"). at /app/data/mixpost-pro-team-app/vendor/symfony/console/Input/Input.php:76)
this seems like some CLI is expecting more arguments (specifically --name or something)
-
All errors cleared, and the system has been up for about two days going on three so i think it's safe to say its usable
Still need a workaround for one last step to complete: configure a process monitor Supervisor as it wants to write to /etc/supervisor/conf.dOther than that i will document the steps i took and share them here before the end of the week
-
Cloudron + Mixpost + LAMP = +1
Note: this is for the Pro/Enterprise version of Mixpost
On a fresh LAMP install open a terminal
Step 1:
cd /app/data/
Step 2:
composer create-project inovector/mixpost-pro-team-app
Step 3: From the File Manager: You can use command line if you like
Change owner of the mixpost-pro-team-app folder to www-data
Step 4 Enter the mixpost-pro-team-app folder and open .env and Populate:
APP_URL=https://YOUR-DOMAIN APP_ENV=production (WHEN READY) APP_DEBUG=fale
Step 5: Populate SQL (creds @: /app/data/credentials.txt)
DB_HOST=172.18.30.1 / DB_PORT=3306 / DB_DATABASE=CLOUDRON_MYSQL_DATABASE DB_USERNAME=CLOUDRON_MYSQL_USERNAME DB_PASSWORD=CLOUDRON_MYSQL_PASSWORD
NOTE: I had to put the slash / after the two DB_ env vars because the numbers were causing a line bug in the markdown while generating this post so make sure to remove them if you copy and paste the whole code block
Step 6: Populate REDIS (creds @: /app/data/credentials.txt )
REDIS_HOST=CLOUDRON_REDIS_HOST REDIS_PASSWORD=CLOUDRON_REDIS_PASSWORD REDIS_PORT=6379
- Save and Close
Step 7: Configure Database Tables:
cd /app/data/mixpost-pro-team-app php artisan queue:batches-table php artisan migrate php artisan vendor:publish --tag=mixpost-config
Step 8: go to and edit
/app/data/apache/app.conf
Change both instances of: /app/data/public
To:/app/data/mixpost-pro-team-app/public
- Save and Close
Step 9: On the CRON tab paste and save below:
* * * * * cd /app/data/mixpost-pro-team-app && php artisan schedule:run >> /app/data/null 2>&1
Step 10: Install Supervisor:
sudo apt-get install supervisor
Step 11: Cache Config:
php artisan config:cache
Step 12: Cache Routes:
php artisan route:cache
Step 13: Restart the APP to save the config
Step 14: Go to /app/data/mixpost-pro-team-app/ & Then Start Horizon
cd /app/data/mixpost-pro-team-app/ php artisan horizon
Step 15: Go to the landing page and register!
🦾
NOTE: i think there is still a need to figure out a solution to configure Supervisor: https://docs.inovector.com/books/server-configuration-mixpost/page/installing-configuring-supervisor
-
Until then manually start the app with php artisan horizon as needed
-
I Only have one license so I had to retrace the steps I took. If there are any errors please forgive me!
-
If anyone runs into issues let me know. I will help troubleshoot and can rebuild my instance as needed =]
️+1
-
-
@plusone-nick I have a Pro license and haven't been able to try Mixpost yet. I'll give it shot soon and report back. Thank you so much for getting this going!!
-
@plusone-nick Step 7 error: Could not open input file: artisan
I decided to continue anyway. Step 8 & 9 were easy. Step 10 error: bash: cd: app/Console/: No such file or directory
This is where I stopped. To backtrack a bit, what exactly do you mean by populate? I might have messed up Step 5 & 6. I tried to use the variables and not the actual values since it's mentioned they change on app restart so, CLOUDRON_MYSQL_DATABASE but that didn't get me through Step 7. Then, I tried the actual values of each field which were located in /app/data/credentials.txt. That didn't help with Step 7 either.
-
@humptydumpty you can't use the variables until you set them in the .env file
so you have to remove the placeholders like "CLOUDRON_MYSQL_DATABASE" and put the value for that variable which is located in /app/data/credentials.txt
They are like 16 and 32 characters long -
OK, I made the changes and this is my .env file:
Still, step 7 with same error.
-
I think I'm doing Step 7 wrong. Do you paste all 3 commands together in the terminal or do these go elsewhere?
Edit: I'm reading thru Mixpost's docs, and I think I prematurely changed the APP_ENV to production. They have that listed after doing the artisan stuff and when the UI is up. I'll try again tomorrow with a fresh mind. Doing this after work is a horrible idea
-
@humptydumpty do them one at a time and i think you can change it back. I will try a build from scratch tomorrow and go thru the docs to update as needed.