Mixpost
-
@privsec Please keep in mind, I just installed it too and I haven't used the app before, so I'm in the same boat as you. However, since we worked out all the errors, the upgrade path should keep all existing posts/users/media/etc. intact.
Start with Nick's installation guide (#49) (skip step 10; somehow the app works without supervisor) and apply the fixes in #83 to get rid of the errors during the outlined steps. Yes, I believe we will have to do the fixes for each upgrade since any new files that get added by the upgrade will default to root ownership which need to be changed to www-data.
My suggestion is to try to install it the first time while keeping in mind that it's a test run just to familiarize yourself with the process. Then, you'll know when to apply the fixes during the intial installation. A cool thing you can do here is to create a backup of the fresh LAMP that you can restore to. If you delete the app and reinstall it, then all the credentials (mysql, phpmyadmin, etc.) will change.
One thing that wasn't mentioned yet, during the installation, you'll be asked "do you want to save these credentials". Say Yes!
I feel comfortable enough to start using the app for my own use. I wouldn't dare give it out to paid clients since it's not a packaged app and Horizon is working automagically but no one knows how because it shouldn't be able to stay alive! With that said, Cloudron backups work and the app itself is stable enough for production use.
-
@privsec I just realized my mistake. For the initial installation follow #49 (skip step 10; somehow the app works without supervisor) and apply the fixes in #83 to get rid of the errors during the outlined steps.
In the future when you need to upgrade from v1.0 to v1.X, follow the upgrade guide in comment #84 and apply the fixes in comment #83. If you do #49 again, user data won't transfer over.
-
@humptydumpty interesting. LAMP app has no special code to run horizon in the background. There must be something else running it. Have you tried to use ps to figure out what the parent process of horizon is?
-
@girish I ran ps aux (had to look that up, I love that you're mistaking my copy/paste skills with actual coding knowledge )
root@fb19c14f-edfa-432b-b7a1-89f306948ce0:/app/data/mixpost-pro-team-app# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 320052 53260 pts/0 Ss+ Aug21 0:13 /usr/sbin/apache2 -DFOREGROUND root 17 0.0 0.0 2928 1008 pts/0 S+ Aug21 0:00 /bin/cat root 18 0.0 0.0 2928 1000 pts/0 S+ Aug21 0:01 /bin/cat root 22 0.0 0.0 5048 4032 pts/1 Ss Aug21 0:00 /bin/bash root 34 0.1 0.2 292272 80148 pts/1 S+ Aug21 3:33 php artisan horizon root 36 0.1 0.2 292276 79832 pts/1 S+ Aug21 3:36 /usr/bin/php8.1 artisan horizon:supervisor fb19c14f-edfa-432b-b7a1-89f306948ce0-CXZh:supervisor-1 redis --workers-name=default --balance=auto -- root 37 0.1 0.2 292276 80208 pts/1 S+ Aug21 3:22 /usr/bin/php8.1 artisan horizon:supervisor fb19c14f-edfa-432b-b7a1-89f306948ce0-CXZh:mixpost-heavy mixpost-redis --workers-name=default --balanc root 1528 0.0 0.2 369804 90236 pts/1 S+ Aug21 1:09 /usr/bin/php8.1 artisan horizon:work mixpost-redis --name=default --supervisor=fb19c14f-edfa-432b-b7a1-89f306948ce0-CXZh:mixpost-heavy --backoff www-data 9960 0.1 0.1 321308 43272 pts/0 S+ 02:25 0:02 /usr/sbin/apache2 -DFOREGROUND www-data 10041 0.2 0.1 321056 42980 pts/0 S+ 02:44 0:00 /usr/sbin/apache2 -DFOREGROUND root 10042 0.0 0.0 5048 4012 pts/2 Ss 02:45 0:00 /bin/bash root 10078 6.8 0.2 292228 79640 pts/1 S+ 02:49 0:00 /usr/bin/php8.1 artisan horizon:work redis --name=default --supervisor=fb19c14f-edfa-432b-b7a1-89f306948ce0-CXZh:supervisor-1 --backoff=0 --max- root 10083 0.0 0.0 7480 3224 pts/2 R+ 02:49 0:00 ps aux
Edit: old dog learned a new trick (ps auxf)
root@fb19c14f-edfa-432b-b7a1-89f306948ce0:/app/data/mixpost-pro-team-app# ps auxf USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 10042 0.0 0.0 5048 4016 pts/2 Ss 02:45 0:00 /bin/bash root 10148 0.0 0.0 7480 3084 pts/2 R+ 03:04 0:00 \_ ps auxf root 22 0.0 0.0 5048 4032 pts/1 Ss Aug21 0:00 /bin/bash root 34 0.1 0.2 292272 80148 pts/1 S+ Aug21 3:35 \_ php artisan horizon root 36 0.1 0.2 292276 79832 pts/1 S+ Aug21 3:38 \_ /usr/bin/php8.1 artisan horizon:supervisor fb19c14f-edfa-432b-b7a1-89f306948ce0-CXZh:supervisor-1 redis --workers-name=default --balance root 10143 0.9 0.2 292228 79708 pts/1 S+ 03:03 0:00 | \_ /usr/bin/php8.1 artisan horizon:work redis --name=default --supervisor=fb19c14f-edfa-432b-b7a1-89f306948ce0-CXZh:supervisor-1 --back root 37 0.1 0.2 292276 80208 pts/1 S+ Aug21 3:23 \_ /usr/bin/php8.1 artisan horizon:supervisor fb19c14f-edfa-432b-b7a1-89f306948ce0-CXZh:mixpost-heavy mixpost-redis --workers-name=default root 1528 0.0 0.2 369804 90236 pts/1 S+ Aug21 1:09 \_ /usr/bin/php8.1 artisan horizon:work mixpost-redis --name=default --supervisor=fb19c14f-edfa-432b-b7a1-89f306948ce0-CXZh:mixpost-hea root 1 0.0 0.1 320052 53260 pts/0 Ss+ Aug21 0:13 /usr/sbin/apache2 -DFOREGROUND root 17 0.0 0.0 2928 1008 pts/0 S+ Aug21 0:00 /bin/cat root 18 0.0 0.0 2928 1000 pts/0 S+ Aug21 0:01 /bin/cat www-data 9960 0.1 0.1 321308 43276 pts/0 S+ 02:25 0:04 /usr/sbin/apache2 -DFOREGROUND www-data 10041 0.1 0.1 321056 43004 pts/0 S+ 02:44 0:02 /usr/sbin/apache2 -DFOREGROUND www-data 10090 0.1 0.1 321056 42988 pts/0 S+ 02:51 0:01 /usr/sbin/apache2 -DFOREGROUND
more copy paste info i found online
root@fb19c14f-edfa-432b-b7a1-89f306948ce0:/app/data/mixpost-pro-team-app# ps -Flww -p 34 F S UID PID PPID C PRI NI ADDR SZ WCHAN RSS PSR STIME TTY TIME CMD 0 S root 34 22 0 80 0 - 73068 hrtime 80148 5 Aug21 pts/1 00:03:35 php artisan horizon root@fb19c14f-edfa-432b-b7a1-89f306948ce0:/app/data/mixpost-pro-team-app# cd /proc/34 root@fb19c14f-edfa-432b-b7a1-89f306948ce0:/proc/34# ls arch_status cgroup coredump_filter environ gid_map map_files mounts numa_maps pagemap root setgroups stat task uid_map attr clear_refs cpu_resctrl_groups exe io maps mountstats oom_adj patch_state sched smaps statm timens_offsets wchan autogroup cmdline cpuset fd limits mem net oom_score personality schedstat smaps_rollup status timers auxv comm cwd fdinfo loginuid mountinfo ns oom_score_adj projid_map sessionid stack syscall timerslack_ns root@fb19c14f-edfa-432b-b7a1-89f306948ce0:/proc/34# cat /proc/34/status Name: php Umask: 0022 State: S (sleeping) Tgid: 34 Ngid: 0 Pid: 34 PPid: 22 TracerPid: 0 Uid: 0 0 0 0 Gid: 0 0 0 0 FDSize: 256 Groups: 0 NStgid: 34 NSpid: 34 NSpgid: 34 NSsid: 22 VmPeak: 292324 kB VmSize: 292272 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 80148 kB VmRSS: 80148 kB RssAnon: 20828 kB RssFile: 37968 kB RssShmem: 21352 kB VmData: 21536 kB VmStk: 132 kB VmExe: 3020 kB VmLib: 62052 kB VmPTE: 312 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 2/120015 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000000001000 SigCgt: 0000000004024a07 CapInh: 0000000000000000 CapPrm: 00000000a80405fb CapEff: 00000000a80405fb CapBnd: 00000000a80405fb CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 2 Seccomp_filters: 1 Speculation_Store_Bypass: thread force mitigated SpeculationIndirectBranch: conditional force disabled Cpus_allowed: ff Cpus_allowed_list: 0-7 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 339836 nonvoluntary_ctxt_switches: 387995
-
@humptydumpty Could it be that you started
php artisan horizon
manually on a web terminal ? Have you tested that it starts up automatically after restarting the app ? (which kills all the existing web terminal sessions). -
@humptydumpty yes, correct, you can just put it in the app's cron . Alternately, the LAMP app supports a startup script - https://docs.cloudron.io/apps/lamp/#custom-startup-script .
-
App won't start. I think I know why its because the php artisan horizon has to be cd'd to /app/data/mixpost-pro-team-app/ first. How do you enter that in run.sh?startup script didn't work.After much trial and error, I got the cron method to start horizon automatically after I remembered the @service cron Girish mentioned in an earlier post.
@service cd /app/data/mixpost-pro-team-app && php artisan horizon * * * * * cd /app/data/mixpost-pro-team-app && php artisan schedule:run >> /app/data/null 2>&1
@plusone-nick add this cron to your install guide
-
I updated from Mixpost Pro v.1.0.0 to v.1.2.0 using the official Mixpost update guide. But you need to do one thing beforehand, and another at the end to complete the steps on Cloudron.
Step 1: navigate to the mixpost folder before starting the update process
cd /app/data/mixpost-pro-team-app/
Step 2: follow update guide https://docs.inovector.com/books/mixpost-pro/page/in-your-standalone-or-laravel-app
Step 3: finish it off by running
php artisan horizon
Done.
-
Starting to hit storage issues. I received a backup failed notification. The app size was around 100MB for a fresh install. Now it's 3.98 GB! I'm not really using the app yet or uploading any media so the increase must be from the last update I did (v1.0 to v1.2).
Edit: The culprit is the log file located at /mixpost-pro-team-app/storage/logs/laravel.log (in my case it grew to over 5GB!). It had a lot of Redis references. The app's Redis is green in services and is using around 1/3 of the allocated 150MB so nothing out of the ordinary. The values in the .env file match what's in the credentials.txt file so that's good too. I'll update the post if Dima finds the root cause.
a few lines of the laravel.log file: https://pastebin.com/bkWK1LGA
-
@humptydumpty maybe you can symlink that file to somewhere in /run so that it is not part of the backup.
-
@girish I'll have to look into how I can accomplish that. Thanks for the hint!
Edit: I don't see a /run folder. Do you mean run.sh?
Edit 2: I think I found out how to do it via the run.sh method: https://docs.cloudron.io/apps/lamp/#custom-startup-script
The example on that page is:
# create symlinks rm -rf /app/data/var/cache mkdir -p /run/cache ln -sf /run/cache /app/data/var/cache
correct me if I'm wrong, but for my use case it should be something like:
# create symlinks rm -rf /app/data/mixpost-pro-team-app/storage/logs mkdir -p /run/logs ln -sf /run/logs /app/data/mixpost-pro-team-app/storage/logs
Edit 3: The app started fine with the code above in run.sh. Now, it looks like this in the file manager, so I guess it's working.
@girish I can't open the logs folder in the file manager; clicking on it does nothing. I'm worried that the log file will get too large and will require manual deletion in the future. What's the easiest way to access the folder or better yet, a way to auto-delete the log file after x days?
-
@girish what's the file location for the /run folder that I symlinked earlier? I logged in via SFTP using FileZilla and can see the all the server folders (/) but haven't been able to locate the symlinked folder.
-
@humptydumpty that sftp looks suspect. Only the
/app/data
directory is exposed via SFTP and not the entire container filesystem. Looks like you are logged in somewhere else.There is no way to browse
/run
etc via SFTP. You have to use the Web Terminal. -
@girish I'm logging in as root and I'm positive that the IP is my Contabo VPS. On first login, the page looks like this.
Then, I can click on / and it shows this:
Any way, there's no way to access the /logs folder now via the web terminal in Cloudron dashboard. It's showing a grey file icon and double-clicking or right-clicking > open, does nothing.Brain fart! You're saying web terminal and I'm even typing it but thinking of the file manager Nevermind! -
To continue on the root SFTP access thing, I can see /box and /boxdata in the /yellowtent folder.
Should I be concerned about this?
-
@humptydumpty said in Mixpost:
Should I be concerned about this?
concerned about? you are browsing the server's filesystem. The app runs as a container and has it's own filesytem. The app's filesystem is difficult to browse via SFTP.
-
Ah, noted. I misunderstood what you meant and thought that I shouldn't have been able to browse/see the server folders. Thanks for bearing with me!
-
Any updates/ progress on getting this into the App Store? Could @Staff or any other @appdev help it along?
@lao9s I will buy a Pro licence as soon as this is in the Cloudron App Store
(also still kicking myself I didn't get a lifetime one while I could even though I still wouldn't've been able to use it yet )