├── .gitignore ├── .env.example ├── LICENSE ├── README.md └── docker-compose.yml /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | node_modules/ 3 | npm-debug.log 4 | yarn-error.log 5 | 6 | # Laravel 4 specific 7 | bootstrap/compiled.php 8 | app/storage/ 9 | 10 | # Laravel 5 & Lumen specific 11 | public/storage 12 | public/hot 13 | 14 | # Laravel 5 & Lumen specific with changed public path 15 | public_html/storage 16 | public_html/hot 17 | 18 | storage/*.key 19 | .env 20 | Homestead.yaml 21 | Homestead.json 22 | /.vagrant 23 | .phpunit.result.cache 24 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | ### Mixpost ############################ 2 | MIXPOST_RELEASE_NAME=inovector/mixpost 3 | MIXPOST_RELEASE_VERSION=v1.1.1 4 | MIXPOST_APP_NAME='Mixpost' 5 | MIXPOST_APP_URL=http://127.0.0.1:80 6 | MIXPOST_APP_PORT=CHANGE_ME_HERE 7 | MIXPOST_DB_DATABASE='CHANGE_ME_HERE' 8 | MIXPOST_DB_USERNAME='CHANGE_ME_HERE' 9 | MIXPOST_DB_PASSWORD='CHANGE_ME_HERE' 10 | MIXPOST_REDIS_PASSWORD='CHANGE_ME_HERE' 11 | 12 | ### MySQL #################################### 13 | MYSQL_RELEASE_NAME=mysql/mysql-server 14 | MYSQL_RELEASE_VERSION=8.0.32 15 | MYSQL_APP_PORT=3306 16 | 17 | ### Redis #################################### 18 | REDIS_RELEASE_NAME=redis 19 | REDIS_RELEASE_VERSION=latest 20 | REDIS_APP_PORT=6379 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Leonardo J. Caballero G. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mixpost_docker 2 | 3 | A [Mixpost](https://github.com/inovector/mixpost) Installation with Docker Containers. 4 | 5 | Create all the environments values for the **Mixpost** service, executing the following commands: 6 | 7 | ``` 8 | cp .env.example .env 9 | nano .env 10 | ``` 11 | 12 | Checkout the meaning for the environments variables: 13 | 14 | * ``MIXPOST_APP_URL``, Mixpost App Url, like ``http://127.0.0.1:80``. 15 | 16 | * ``MIXPOST_APP_PORT``, Mixpost App Port, like ``9000``. 17 | 18 | * ``MIXPOST_DB_DATABASE``, Mixpost db name, like ``mixpost``. 19 | 20 | * ``MIXPOST_DB_USERNAME``, Mixpost user name, don't use the name with spaces (temporary issue). 21 | 22 | * ``MIXPOST_DB_PASSWORD``, Mixpost user password. 23 | 24 | * ``MIXPOST_REDIS_PASSWORD``, Redis password. 25 | 26 | Replace the ``CHANGE_ME_HERE`` values for the real value and save the ``.env`` file. 27 | 28 | ## Run the containers 29 | 30 | Pull the images and run the containers, executing the following command: 31 | 32 | ``` 33 | docker-compose up -d 34 | ``` 35 | 36 | An admin user will be created automatically. Check the mixpost container logs to find out the password, executing the following command: 37 | 38 | ``` 39 | docker-compose logs -f mixpost 40 | ``` 41 | 42 | You can log in to Mixpost at ``/mixpost`` using the admin user account created. 43 | 44 | ## Create new user 45 | 46 | Once you have installed Mixpost using Docker, you can create a new user. 47 | 48 | Log in to Mixpost container, executing the following command: 49 | 50 | ``` 51 | docker-compose exec -it mixpost bash 52 | ``` 53 | 54 | Then, executing the following command: 55 | 56 | ``` 57 | php artisan mixpost-auth:create 58 | ``` 59 | 60 | ## Conclusion 61 | 62 | Docker is a powerful tool for managing applications in containers. By following the steps outlined in this guide, you can easily install and manage Mixpost using Docker. 63 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.9' 2 | 3 | services: 4 | mixpost: 5 | image: "${MIXPOST_RELEASE_NAME}:${MIXPOST_RELEASE_VERSION}" 6 | environment: 7 | APP_NAME: ${MIXPOST_APP_NAME} 8 | APP_URL: ${MIXPOST_APP_URL} 9 | DB_DATABASE: ${MIXPOST_DB_DATABASE} 10 | DB_USERNAME: ${MIXPOST_DB_USERNAME} 11 | DB_PASSWORD: ${MIXPOST_DB_PASSWORD} 12 | REDIS_PASSWORD: ${MIXPOST_REDIS_PASSWORD} 13 | ports: 14 | - ${MIXPOST_APP_PORT}:80 15 | volumes: 16 | - mixpost-storage:/var/www/html/storage/app 17 | - mixpost-logs:/var/www/html/storage/logs 18 | depends_on: 19 | - mysql 20 | - redis 21 | mysql: 22 | image: "${MYSQL_RELEASE_NAME}:${MYSQL_RELEASE_VERSION}" 23 | ports: 24 | - '${MYSQL_APP_PORT}:3306' 25 | environment: 26 | MYSQL_DATABASE: ${MIXPOST_DB_DATABASE} 27 | MYSQL_USER: ${MIXPOST_DB_USERNAME} 28 | MYSQL_PASSWORD: ${MIXPOST_DB_PASSWORD} 29 | volumes: 30 | - 'mixpost-mysql:/var/lib/mysql' 31 | healthcheck: 32 | test: ["CMD", "mysqladmin", "ping", "-p ${MIXPOST_DB_PASSWORD}"] 33 | retries: 3 34 | timeout: 5s 35 | redis: 36 | image: "${REDIS_RELEASE_NAME}:${REDIS_RELEASE_VERSION}" 37 | command: redis-server --appendonly yes --replica-read-only no --requirepass "${MIXPOST_REDIS_PASSWORD}" 38 | ports: 39 | - '${REDIS_APP_PORT}:6379' 40 | volumes: 41 | - 'mixpost-redis:/data' 42 | healthcheck: 43 | test: ["CMD", "redis-cli", "ping"] 44 | retries: 3 45 | timeout: 5s 46 | volumes: 47 | mixpost-mysql: 48 | driver: local 49 | mixpost-redis: 50 | driver: local 51 | mixpost-storage: 52 | driver: local 53 | mixpost-logs: 54 | driver: local 55 | --------------------------------------------------------------------------------