This document provides guidance for developers to set up, build, and manage the Inception project.
- Operating System: Linux or macOS.
- Docker Installed:
docker --version docker compose version
- Additional Tools:
sudo apt-get install make git curl # Linux brew install make git curl # macOS
git clone <repository-url> inception
cd inception- Create the
.envfile insrcs/:touch srcs/.env
- Add the required variables:
MYSQL_ROOT_PASSWORD=your_root_password MYSQL_DATABASE=wordpress MYSQL_USER=your_user MYSQL_PASSWORD=your_password DOMAIN_NAME=fmorenil.42.fr
Add the following line to /etc/hosts:
127.0.0.1 fmorenil.42.fr- Build and Start:
make
- Stop Containers:
make stop
- Remove Containers:
make down
- Full Cleanup:
make fclean
- Rebuild Everything:
make re
- Build Images:
docker compose -f srcs/docker-compose.yml build
- Start Services:
docker compose -f srcs/docker-compose.yml up -d
- Stop Services:
docker compose -f srcs/docker-compose.yml down
- List Running Containers:
docker ps
- View Logs:
docker logs srcs-mariadb-1
- Access a Container:
docker exec -it srcs-wordpress-1 bash - Inspect Volumes:
docker volume ls
- Backup a Volume:
tar -czf wordpress-backup.tar.gz ~/data/wordpress
- Host Path:
~/data/mariadb - Contents: Database files and logs.
- Backup:
docker exec srcs-mariadb-1 mysqldump -u root -p${MYSQL_ROOT_PASSWORD} wordpress > backup.sql
- Host Path:
~/data/wordpress - Contents: WordPress files, themes, plugins, and uploads.
- Backup:
tar -czf wordpress-backup.tar.gz ~/data/wordpress