PHP-based Instagram clone using Laravel for the backend and Docker for the environment setup. It features user authentication, profile management, and photo sharing functionalities.
1. $ cp .env.template .env
2. $ cd backend
3. $ ls -la [to check the current files / folders existing inside the ./backend folder]
4. $ sudo rm -rf your_file_or_folder_name [to delete your file/folder]
5. $ cd .. [return to the main folder]
5. $ make create-project
6. Edit db info and app_url inside the ./backend/.env file
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=kredo
DB_USERNAME=kredo
DB_PASSWORD=password
6. $ docker-compose exec app php artisan migrate
check browser
web server: http://localhost/
php my admin: http://localhost:8888/
executables
# up default container
$ docker-compose up -d
# build no cache and force remake container
$ docker-compose build --no-cache --force-rm
# check container
$ docker ps
# stop container
$ docker-compose stop
# remove container
$ docker-compose down
# remove all of container stuff
# docker-compose down --rmi all --volumes
# log for laravel
$ docker-compose logs
# seeding the database
$ docker-compose exec app php artisan db:seed
FOR WINDOWS ENVIRONMENT
MAKE SURE TO EXECUTE THE COMMANDS UNDER GIT BASH TERMINAL. IF YOU DON'T HAVE GIT BASH IN YOUR SYSTEM, KINDLY REFER TO THIS LINK
1. https://git-scm.com/downloads
2. Select the installer for windows
installation
1. git clone this repository
2. cd project
Prioritize this change. Copy the line of code below and change the infra/mysql/Dockerfile code
FROM mysql:8.0.26
COPY ./my.cnf /etc/mysql/conf.d/my.cnf
RUN chmod 644 /etc/mysql/conf.d/my.cnf
create a project
1. mkdir -p ./docker/php/bash/psysh
2. touch ./docker/php/bash/.bash_history
3. cp .env.template .env
4. [unhide ALL FILES AND FOLDERS inside the ./backend and delete it manually]
5. winpty docker-compose up --build -d
6. winpty docker-compose exec app composer create-project --prefer-dist laravel/laravel . "8.*"