This repository contains the source code for the Content Management System (CMS) used by SMKN 4 Bandung. The CMS is designed to facilitate the management and maintenance of the school's online presence.
Before you begin, ensure you have met the following requirements:
- PHP >= 7.0
- Composer (Version 1.*)
- Docker and Docker Compose (optional, for Docker setup)
- MySQL database server
To get started with this CMS, follow these steps:
- Create a
.envfile in the project root directory.
touch .env-
Copy the
.env.exampleto the.envfile and replaceyour_database_passwordandyour_database_usernamewith your MySQL database credentials and don't forget to changeyour_database_hostwith where you hosted the database, If you usingdocker-composeto run this project, you must changeyour-database_hostwith:DB_HOST=db -
Save the .env file.
-
Install PHP dependencies using Composer:
composer install -
Run database migrations to set up the database schema:
php artisan migrate -
Run database seeder:
php artisan db:seedYou can also run an example default seeder:
php artisan db:seed ---class=ExampleDefaultSeeder -
Generete your app key:
php artisan key:generate -
Run the project
php artisan serve -
Access the project in your web browser at http://localhost:8000/
If you prefer to use Docker for development, follow these steps:
- Ensure you have Docker and Docker Compose installed on your system.
- Create empty
mysqldir inside yourdockerdir - Run the following command to start the containers:
docker compose up -d --build docker compose exec app rm -rf vendor composer.lock docker compose exec app composer install docker compose exec app php artisan key:generate docker compose exec app php artisan migrate docker compose exec app php artisan db:seed - Access the project in your web browser at http://localhost:8000.