Skip to content

Standalone application with the Laravel Package of Mixpost Lite pre-installed and configured

Notifications You must be signed in to change notification settings

PetrRubens/MixpostApp

Repository files navigation


Logo Mixpost

Welcome to Mixpost

Mixpost it's the coolest Self-hosted social media management software.

Easily create, schedule, publish, and manage social media content in one place, with no limits or monthly subscription fees. More details on mixpost.app.

Join our community:

About Mixpost Lite

Mixpost Lite is the free version of Mixpost.

This repository is the standalone application with the Laravel Package of Mixpost Lite pre-installed and configured.

Mixpost has 3 packages:

  • Lite (Personal use only)
  • Pro Team (Business use)
  • Pro SaaS (Launch your own SaaS and start generating revenue)

Do you want a more advanced version? Mixpost Pro is under development and will be released soon. Sign up to be notified when it's released mixpost.app.

Requirements

  • PHP 8.1 or higher
  • Database (eg: MySQL, PostgresSQL, SQLite)
  • Redis 6.2 or higher
  • Web Server (eg: Apache, Nginx, IIS)
  • URL Rewrite (eg: mod_rewrite for Apache)

Installation

Install Mixpost Lite with composer:

composer create-project inovector/MixpostApp

Configure the app url

You will need to modify the value of the APP_URL in the .env file to your project URL.

For example: APP_URL=https://your-domain.com

Configure the database

You will need to modify the values of the DB_* entries in the .env file to make sure they are aligned with your database.

Then, run migration to create all tables.

php artisan migrate

Create the first user

After that you can create an initial user by executing:

php artisan mixpost-auth:create

You can log in to Mixpost at /mixpost using the user account you created.

Server configuration (Manual)

Please do not skip the server configuration step as it is important for Mixpost to work well.

Installing FFmpeg

Mixpost has the ability to generate images from video while uploading a video file. This would not be possible without FFmpeg installed on your server.

You need to follow FFmpeg installation instructions on their official website.

Installing Redis

So that the posts can be scheduled, Mixpost puts them in the queue.

To be able to do this, you need to install Redis. Then, you will need to modify the values of the REDIS_* entries in the .env file to make sure they are aligned with your redis instance.

Installing Supervisor

You need to configure a process monitor. To install Supervisor on Ubuntu, you may use the following command:

sudo apt-get install supervisor

Configuring Supervisor

Supervisor configuration files are typically stored in the /etc/supervisor/conf.d.

Create the file mixpost-horizon.conf inside of conf.d folder and put this configuration content:

[program:mixpost_horizon]
process_name=%(program_name)s
command=php /path-to-your-project/artisan horizon
autostart=true
autorestart=true
user=your_user_name
redirect_stderr=true
stdout_logfile=/path-to-your-project/storage/logs/horizon.log
stopwaitsecs=3600

Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:

sudo supervisorctl reread
 
sudo supervisorctl update
 
sudo supervisorctl start mixpost_horizon:*

Cron

Add a cron that running the scheduler:

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

Other things to consider

Some files that are uploaded, video for example, can be up to 200 mb, by default most web servers have configured a much smaller limit. You will need to check this.

In php.ini:

post_max_size = 200M
upload_max_filesize = 200M

Then, restart your php process. For php fpm you can restart with:

sudo systemctl restart php8.1-fpm.service
sudo systemctl reload php8.1-fpm.service 

In nginx.conf:

http {
    client_max_body_size 200M;
}

Then, sudo systemctl restart nginx

For apache, /etc/httpd/conf/httpd.conf.

LimitRequestBody 209715200

Then: sudo systemctl restart httpd


Docker Installation

Logo Docker


We provide you two methods of installing the Mixpost using Docker:

  • Pull Docker image.
  • Build Docker image on your machine and have full control.

Pull Docker image

This is the most suitable method, see image on docker hub, there are also the installation instructions. You can use Portainer to install Mixpost Lite or simply by creating a docker-composer.yml file.

Build Docker Image on your machine

You can build a docker image that will have all server configurations and start the containers.

This method is mostly for developers. If you decide to install Mixpost using this method, it means that you know what you are doing.

Download the latest version of Mixpost Lite from here, copy .env.example to .env, and fill in all the necessary values:

APP_PORT=80
UID=1000 // Your local user id, you can find it this way: id -u
GID=1000 // Your local group id, you can find it this way: id -g

DB_HOST=127.0.0.1
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null

Important: the DB_HOST must be mysql and REDIS_HOST must be redis.

Attention! If you have already installed the project with composer composer create-project inovector/MixpostApp, you can avoid step 3 below.

1. Build Mixpost Lite image & Run the containers:

docker-compose up -d

IMORTANT NOTE!

If you are logged in as the root user on your machine, you must make sure that the user in the container is the owner of the files:

docker-compose exec -it app bash

# If the command above cannot log you into the container:
# `docker ps`, and identify the mixpost container name
# docker exec -it {mixpost_container_name} bash

chown -R mixpost:mixpost /var/www/html

exit

2. Make the binary mixpost file executable:

chmod +x ./docker/mixpost

This binary will help you to avoid the long command docker-compose exec -it -u mixpost app. If you don't want to use this binary, you are free to use docker-compose command.

3. Execute these commands one by one to setup Mixpost Lite:

./docker/mixpost composer install
./docker/mixpost php artisan key:generate
./docker/mixpost php artisan mixpost:setup-gitignore
./docker/mixpost php artisan queue:batches-table
./docker/mixpost php artisan storage:link
./docker/mixpost php artisan queue:restart

If you are reading for production, you cache the config and routes:

./docker/mixpost php artisan config:cache
./docker/mixpost php artisan route:cache

Do not forget to restart the queue after caching: ./docker/mixpost php artisan queue:restart

4. And then you can migrate all tables:

./docker/mixpost php artisan migrate

5. Create the first user:

./docker/mixpost php artisan mixpost-auth:create

You can log in to Mixpost at /mixpost using the user account you created.

About

Standalone application with the Laravel Package of Mixpost Lite pre-installed and configured

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 99.2%
  • Other 0.8%