Skip to content

Commit

Permalink
Merge pull request #10 from inovector/new-doc
Browse files Browse the repository at this point in the history
removed docker, optimized .env.example, added aws env vars
  • Loading branch information
lao9s authored May 3, 2024
2 parents 3ceafc8 + e77cabf commit 381ff4c
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 440 deletions.
48 changes: 17 additions & 31 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,47 +1,33 @@
# You app name. It is usually equal to the name of your project.
APP_NAME='Mixpost Lite'
# This value is the name of your application.
APP_NAME='Mixpost'

# Your application environment. If you are ready for production, set 'production'
APP_ENV=local

# Is used to encrypt and decrypt sensitive data. Generate it with: 'php artisan key:generate'
# Key used to encrypt and decrypt sensitive data. Generate this using the following tool:
# https://mixpost.app/tools/encryption-key-generator
APP_KEY=

# Debug mode. If the environment is in production, we recommend setting it to 'false'
APP_DEBUG=true

# URL of your application. Important: it is not allowed to be a slash at the end of the url.
APP_URL=http://localhost

# You can define the application port here (Only if you install with docker-compose)
APP_PORT=80
# Debug mode setting. Set to 'false' for production environments.
APP_DEBUG=false

# The user ID in your system. You can find it with 'id -u' (Only if you install with docker-compose)
UID=1000
# Full application URL. Important: it is not allowed to be a slash at the end of the url.
APP_URL=https://example.com

# The group ID in your system. You can find it with 'id -g' (Only if you install with docker-compose)
GID=1000

# Mysql connection setup
DB_CONNECTION=mysql # Change this only if you know what you are doing
# MySQL connection setup
DB_HOST=127.0.0.1
DB_PORT=3306
FORWARD_DB_PORT=3306 # (Only if you install with docker-compose. You can leave it 3306)
DB_DATABASE=laravel
DB_DATABASE=mixpost_db
DB_USERNAME=root
DB_PASSWORD=

# Redis connection setup
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
FORWARD_REDIS_PORT=6379 # (Only if you install with docker-compose. You can leave it 6379)

#Change this only if you know what you are doing
QUEUE_CONNECTION=redis

#Change this only if you know what you are doing
MIXPOST_DISK=mixpost
# The disk on which to store added files. Disks: "public", "s3". For "s3" you should fill in the AWS_* credentials below.
MIXPOST_DISK=public

#Change this only if you know what you are doing
MIXPOST_LOG_CHANNEL=mixpost
# AWS Credentials
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=
AWS_BUCKET=
171 changes: 7 additions & 164 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[<img src="./art/standwithua.png" />](https://supportukrainenow.org)

* * *

[<img src="./art/logo.svg" alt="Logo Mixpost" />](https://mixpost.app)

Expand All @@ -9,172 +6,18 @@

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](https://mixpost.app/).

Join our community:

- [Discord](https://discord.gg/5YdseZnK2Z)
- [Facebook Private Group](https://www.facebook.com/groups/inovector)

## About Mixpost Lite

Mixpost Lite is the free version of Mixpost.

This repository is the standalone application with the [Laravel Package of Mixpost Lite](https://github.com/inovector/mixpost) pre-installed and configured.
This package is the Lite version of Mixpost Pro.

Mixpost has 3 packages:
Easily create, schedule, publish, and manage social media content in one place, with no limits or monthly subscription fees.

- Lite (Personal use only)
- Pro Team (Business use)
- Pro SaaS (Launch your own SaaS and start generating revenue)
More details on [mixpost.app](https://mixpost.app/)

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](https://mixpost.app/).

## Requirements
Join our community:

* 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)
- [Discord](https://mixpost.app/discord)
- [Facebook Private Group](https://www.facebook.com/groups/getmixpost)

## Installation

Install Mixpost Lite with composer:

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

```bash
php artisan migrate
```

### Create the first user

After that you can create an initial user by executing:

```bash
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.*

[Server configuration Guide](https://docs.inovector.com/books/server-configuration-mixpost)

***

## Docker Installation

<img src="./art/docker.webp" width="200px" alt="Logo Docker" />

<br>

**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](https://hub.docker.com/r/inovector/mixpost), there are also the installation instructions. You can use [Portainer](https://www.portainer.io/) 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](https://github.com/inovector/MixpostApp/releases), copy .env.example to `.env`, and fill in all the necessary values:
```env
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:
```bash
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:

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

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

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

```bash
./docker/mixpost php artisan migrate
```

### 5. Create the first user:
```bash
./docker/mixpost php artisan mixpost-auth:create
```
Read our [documentation](https://docs.mixpost.app/lite) on how to get started.

You can log in to Mixpost at `/mixpost` using the user account you created.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"inovector/mixpost-auth": "^1.0",
"laravel/framework": "^10.0",
"laravel/horizon": "^5.14",
"laravel/tinker": "^2.8"
"laravel/tinker": "^2.8",
"league/flysystem-aws-s3-v3": "^3.0",
"league/flysystem-sftp-v3": "^3.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
Expand Down
9 changes: 0 additions & 9 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
],

'mixpost' => [
'driver' => 'local',
'root' => storage_path('app/public/mixpost'),
'url' => env('APP_URL').'/storage/mixpost',
'visibility' => 'public',
'throw' => false,
],

],

/*
Expand Down
9 changes: 1 addition & 8 deletions config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,7 @@

'emergency' => [
'path' => storage_path('logs/laravel.log'),
],

'mixpost' => [
'driver' => 'daily',
'path' => storage_path('logs/mixpost.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
],
]
],

];
2 changes: 1 addition & 1 deletion config/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
|
*/

'default' => env('QUEUE_CONNECTION', 'sync'),
'default' => env('QUEUE_CONNECTION', 'redis'),

/*
|--------------------------------------------------------------------------
Expand Down
52 changes: 0 additions & 52 deletions docker-compose.yml

This file was deleted.

Loading

0 comments on commit 381ff4c

Please sign in to comment.