NM Media Real Time Chat Application using Codeigniter4 and Socket.io
- 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
docker compose up -d --build
docker compose run --rm composer install
docker compose run --rm spark migrate --all
docker compose run --rm spark db:seed DatabaseSeeder
docker compose exec php php ./public/index.php Websocket Websocket index
- Important Note:
- For linux/ubuntu users you must run this too
chmod -R 777 ./writable/
- You can access this link:
http://localhost:8080/
- email:
client1@chat.realtime,
password:Aa112233
- email:
client2@chat.realtime,
password:Aa112233
- email:
client3@chat.realtime,
password:Aa112233
- Note: you can register your own email but you have to verify it.
-
Docker Compose
- UP
docker compose up -d
- Down
docker compose down
- Build
docker compose up -d --build
- Update
docker compose run --rm composer update
- Migrate
docker compose run --rm spark migrate --all
- Run Websocket service
docker compose exec php php ./public/index.php Websocket Websocket index
- UP
-
SQL init
CREATE DATABASE NMCHAT; CREATE USER 'homestead'@'%' IDENTIFIED BY 'secret'; GRANT ALL PRIVILEGES ON * . * TO 'homestead'@'%'; FLUSH PRIVILEGES;