This repository contains basic configuration files and scripts for setting up a development environment. It includes configurations for various tools and services that I use regularly in my projects.
- Docker Compose setup for easy container management with services such as Apache, MySQL, and PHP
- Scripts for automating common tasks related to database management and environment setup
- A structured directory for organizing configuration files and scripts
- A focus on simplicity and ease of use, making it accessible for developers of all levels
-
Clone the repository to your local machine:
git clone https://github.com/realKfiros/env.git
-
Create a dotenv file:
./scripts/create_environment.sh
-
Build the docker containers:
docker compose up -d
create_environment.sh: This script creates a.envfile with the necessary environment variables for the project. It prompts the user to input values for each variable and saves them in the.envfile.mysql_source.sh <dbname>.sql: This script creates a database in thedbcontainer and imports data from a specified SQL file. It takes the name of the SQL file as an argument and executes the necessary commands to set up the database.mysql_drop.sh: This script drops specified databses from thedbcontainer.mysql_clear.sh: This script clears all databases from thedbcontainer.dotenv.sh: This script validates the.envfile
Sometimes you may encounter permission issues when running scripts. To resolve this, you can change the permissions of the script using the following command:
chmod u+x ./scripts/<script>.sh