Insomnia is a forum where people can start new threads or participate in existing threads. The forum members have their own profiles, where they can share their personal information and their activity on the forum. Members can also post on other member's profiles or leave comments on the existing posts.
Other features
- Start conversation with other members. The admins of a conversation can invite, remove or set another participant as admin.
- Mention users in threads, profile posts, comments and messages.
- Follow and unfollow members.
- Ignore and unignore members.
- Notification settings, where members can select how and when they will be notified when various events occur.
- Privacy settings, where members can select how and who can interact with them.
- Search threads, profile posts and tags. It is also possible to search the content of a specific user.
Technologies Used
PHP Laravel Javascript Vue.JS
MySQL Redis Elasticsearch Tailwind CSS
- Docker
- Clone this repository
git clone https://github.com/Orest-Divintari/insomnia.git - Run
cd insomniato go to the app directory. - Run
mv .env.example .envto rename the.env.examplefile to.env. - Run
cp .env ./dockerto Copy the.envfile in the docker folder. - Run
cd dockerto go to the docker folder. - Run
docker-compose run --rm composer installto install the dependencies. - Run
docker-compose up -dto build and start the docker containers. - Run
docker-compose run --rm artisan storage:link --relativeto create a link for the public files. - Run
docker-compose run --rm artisan migrate:fresh --seedto run the migrations and seed the database. - Run
docker-compose run --rm artisan queue:work --queue=notificationsto handle the notifications. - Visit the app in your browser by visiting 127.0.0.1:82.
If you seeded the database, you can login with the following credentials:
-
username : john
-
password : example123
-
username : doe
-
password : example123
You don't have to install anything to run Composer, Artisan and NPM commands. These commands are executed using docker containers and are destroyed after the execution.
| Command | Description |
|---|---|
docker-compose run --rm composer [command] |
Run composer commands |
docker-compose run --rm npm [command] |
Run npm commands |
docker-compose run --rm artisan [command] |
Run artisan commands |
docker-compose run --rm artisan redis:flushall |
Clear redis cache |
docker-compose run --rm artisan scout:flushall |
Remove all records from Elasticsearch |
| Container | Exposed port |
|---|---|
| nginx | :82 |
| mysql | :3306 |
| redis | :6379 |
| elasticsearch | :9200 |
By default the MySQL and Redis data will not be deleted after you remove the docker containers. In order to delete the data after the containers are removed, you have to do the following:
Go to the docker-compose.yml file and:
- In order to delete the MySQL data, remove following line
- ./data/mysql:/var/lib/mysql. - In order to delete the Redis data, remove the following line
- ./data/redis:/data.
The MIT License. Please see the license file for more information.