mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-09 11:47:14 +02:00
• Docs: updated to MAGENTO_VOLUME; removed Installation/User_Administration guides • Compose: volume path → /var/www/html; switched variables to MAGENTO_*/MYSQL_*/OPENSEARCH_* • Env: new variable set + APACHE_SERVERNAME • Task: setup:install via docker compose exec (multiline form) • Schema: removed obsolete credentials definition Link: https://chatgpt.com/share/68b8dc30-361c-800f-aa69-88df514cb160
56 lines
1.5 KiB
Markdown
56 lines
1.5 KiB
Markdown
# Administration
|
|
|
|
## 🗑️ Cleanup (Remove Instance & Volumes)
|
|
```bash
|
|
cd {{ PATH_DOCKER_COMPOSE_INSTANCES }}magento/
|
|
docker compose down
|
|
docker volume rm MAGENTO_VOLUME
|
|
cd {{ PATH_DOCKER_COMPOSE_INSTANCES }} && rm -vR {{ PATH_DOCKER_COMPOSE_INSTANCES }}magento
|
|
```
|
|
|
|
## 🔍 Access Container Shell
|
|
```bash
|
|
docker compose exec -it application /bin/bash
|
|
```
|
|
|
|
## 🧰 Common Magento CLI Tasks
|
|
```bash
|
|
# Reindex
|
|
docker compose exec -it application bin/magento indexer:reindex
|
|
|
|
# Flush caches
|
|
docker compose exec -it application bin/magento cache:flush
|
|
|
|
# Enable maintenance mode
|
|
docker compose exec -it application bin/magento maintenance:enable
|
|
|
|
# Disable maintenance mode
|
|
docker compose exec -it application bin/magento maintenance:disable
|
|
|
|
# Recompile DI (when switching modes)
|
|
docker compose exec -it application bin/magento setup:di:compile
|
|
|
|
# Deploy static content (example for English/German)
|
|
docker compose exec -it application bin/magento setup:static-content:deploy en_US de_DE -f
|
|
```
|
|
|
|
## 🚀 Performance
|
|
```bash
|
|
# Production mode
|
|
docker compose exec -it application bin/magento deploy:mode:set production
|
|
|
|
# Developer mode
|
|
docker compose exec -it application bin/magento deploy:mode:set developer
|
|
```
|
|
|
|
## 🔐 Admin User
|
|
```bash
|
|
# Create another admin (example)
|
|
docker compose exec -it application bin/magento admin:user:create \
|
|
--admin-user="admin2" \
|
|
--admin-password="ChangeMe_12345" \
|
|
--admin-email="{{ users.administrator.email }}" \
|
|
--admin-firstname="Admin" \
|
|
--admin-lastname="User"
|
|
```
|