This cleans up the update-db script, and doesn't require that the variables be declared.
This commit is contained in:
parent
297ae0b51e
commit
ce09981e26
@ -35,10 +35,7 @@ LETSENCRYPT_TEST=true
|
||||
### **Database Configuration**
|
||||
```bash
|
||||
WORDPRESS_DB_PASSWORD=wordpress
|
||||
MYSQL_ROOT_PASSWORD=wordpress
|
||||
MYSQL_DATABASE=wordpress
|
||||
MYSQL_USER=wordpress
|
||||
MYSQL_PASSWORD=wordpress
|
||||
|
||||
```
|
||||
|
||||
### **Volume Configuration**
|
||||
@ -119,7 +116,7 @@ cp -a wp-content-new/* wp-content/
|
||||
chmod -R [appropriate-permissions] wp-content/
|
||||
```
|
||||
|
||||
### **5️⃣ Optional: Database Updates**
|
||||
### **5️⃣ Optional: Database Updates for web address change**
|
||||
```bash
|
||||
# Inside the database container
|
||||
apt-get update && \
|
||||
|
@ -33,9 +33,6 @@ services:
|
||||
- custom_network
|
||||
|
||||
wordpress_${SERVICE_SUFFIX}:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: Dockerfile.wordpress_fpm
|
||||
image: ${IMAGE_WEB:-wordpress}
|
||||
container_name: ${COMPOSE_PROJECT_NAME}_wordpress
|
||||
volumes:
|
||||
|
10
update-db
10
update-db
@ -1,9 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
source ".env"
|
||||
set -o allexport
|
||||
source .env
|
||||
set +o allexport
|
||||
|
||||
website="https://$VIRTUAL_HOST"
|
||||
command="docker compose exec database mariadb"
|
||||
DATABASE_SERVICE="database_${COMPOSE_PROJECT_NAME}"
|
||||
MYSQL_USER=wordpress
|
||||
WORDPRESS_DB_PASSWORD=wordpress
|
||||
MYSQL_DATABASE=wordpress
|
||||
command="docker compose exec $DATABASE_SERVICE mariadb"
|
||||
|
||||
echo $website
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user