Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohammadnourbaker/nmmediatechnicalassessment
Real Time Chat Application using Codeigniter4 and Socket.io
https://github.com/mohammadnourbaker/nmmediatechnicalassessment
codeigniter codeigniter4 docker dockercompose nginx php socketio websocket
Last synced: about 2 months ago
JSON representation
Real Time Chat Application using Codeigniter4 and Socket.io
- Host: GitHub
- URL: https://github.com/mohammadnourbaker/nmmediatechnicalassessment
- Owner: MohammadNourBaker
- License: mit
- Created: 2023-06-27T11:06:10.000Z (over 1 year ago)
- Default Branch: dev
- Last Pushed: 2023-07-02T18:11:57.000Z (over 1 year ago)
- Last Synced: 2024-10-12T12:23:07.413Z (3 months ago)
- Topics: codeigniter, codeigniter4, docker, dockercompose, nginx, php, socketio, websocket
- Language: PHP
- Homepage:
- Size: 153 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NM Media Real Time Chat Application using Codeigniter4 and Socket.io
NM Media Real Time Chat Application using Codeigniter4 and Socket.io
# How To Run:
- Install Docker and Docker compose
- Clone the project
- copy `env` to `.env` and put it in the same folder
- Open the project folder from terminal
#### Now From Terminal run the following:
1. `docker compose up -d --build`
2. `docker compose run --rm composer install`
3. `docker compose run --rm spark migrate --all`
4. `docker compose run --rm spark db:seed DatabaseSeeder`
5. `docker compose exec php php ./public/index.php Websocket Websocket index`
6. Important Note:
- For linux/ubuntu users you must run this too `chmod -R 777 ./writable/`
7. You can access this link: `http://localhost:8080/`# Now every thing is ready, there is three clients accounts:
1. email: `[email protected],` password: `Aa112233`
2. email: `[email protected],` password: `Aa112233`
3. email: `[email protected],` password: `Aa112233`
- Note: you can register your own email but you have to verify it.# Documentation:
- Docker Compose
- UP
``` bash
docker compose up -d
```
- Down
``` bash
docker compose down
```
- Build
```bash
docker compose up -d --build
```
- Update
```bash
docker compose run --rm composer update
```
- Migrate
```bash
docker compose run --rm spark migrate --all
```
- Run Websocket service
```bash
docker compose exec php php ./public/index.php Websocket Websocket index
```- SQL init
```mysql
CREATE DATABASE NMCHAT;
CREATE USER 'homestead'@'%' IDENTIFIED BY 'secret';
GRANT ALL PRIVILEGES ON * . * TO 'homestead'@'%';
FLUSH PRIVILEGES;
```