mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-08 19:27:18 +02:00
- add role files (docs, vars, config, tasks, schema, templates) - networks: add web-app-magento 192.168.103.208/28 - ports: add localhost http 8052 Conversation: https://chatgpt.com/share/68b8820f-f864-800f-8819-da509b99cee2
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_data
|
|
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"
|
|
```
|