Skip to content

Commit

Permalink
add server configuration docs link to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lao9s committed Jun 28, 2023
1 parent 2b441a3 commit 003aee0
Showing 1 changed file with 1 addition and 85 deletions.
86 changes: 1 addition & 85 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,91 +77,7 @@ You can log in to Mixpost at `/mixpost` using the user account you created.

*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](https://ffmpeg.org/download.html).

### 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](https://redis.io/).
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:

```bash
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:

```bash
[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:

```bash
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`:

```conf
post_max_size = 200M
upload_max_filesize = 200M
```

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

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

#### In `nginx.conf`:

```conf
http {
client_max_body_size 200M;
}
```
Then, `sudo systemctl restart nginx`

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

```conf
LimitRequestBody 209715200
```

Then: `sudo systemctl restart httpd`
[Server configuration Guide](https://docs.inovector.com/books/server-configuration-mixpost)

***

Expand Down

0 comments on commit 003aee0

Please sign in to comment.