Solved 'capplications' typo bug

This commit is contained in:
Kevin Veen-Birkenbach 2025-05-09 19:04:24 +02:00
parent 27bfee2438
commit 8ae99aaf46
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
4 changed files with 8 additions and 8 deletions

View File

@ -10,7 +10,7 @@
name: docker-compose name: docker-compose
# The following env file will just be used from the dedicated mariadb container # The following env file will just be used from the dedicated mariadb container
# and not the {{capplications.mariadb.hostname }}-database # and not the {{applications.mariadb.hostname }}-database
- name: "Create {{database_env}}" - name: "Create {{database_env}}"
template: template:
src: "env/{{database_type}}.env.j2" src: "env/{{database_type}}.env.j2"

View File

@ -8,7 +8,7 @@ The following environment variables need to be defined for successful operation:
To completely reset Friendica, including its database and volumes, run: To completely reset Friendica, including its database and volumes, run:
```bash ```bash
docker exec -i {{capplications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;" docker exec -i {{applications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
docker compose down docker compose down
rm -rv /mnt/hdd/data/docker/volumes/friendica_data rm -rv /mnt/hdd/data/docker/volumes/friendica_data
docker volume rm friendica_data docker volume rm friendica_data
@ -19,7 +19,7 @@ docker volume rm friendica_data
## Manual Method: ## Manual Method:
1. Connect to the MariaDB instance: 1. Connect to the MariaDB instance:
```bash ```bash
docker exec -it {{capplications.mariadb.hostname }} mariadb -u root -p docker exec -it {{applications.mariadb.hostname }} mariadb -u root -p
``` ```
2. Run the following commands: 2. Run the following commands:
```sql ```sql
@ -31,7 +31,7 @@ docker volume rm friendica_data
## Automatic Method: ## Automatic Method:
```bash ```bash
DB_ROOT_PASSWORD="your_root_password" DB_ROOT_PASSWORD="your_root_password"
docker exec -i {{capplications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;" docker exec -i {{applications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
``` ```
## Enter the Application Container 🔍 ## Enter the Application Container 🔍

View File

@ -2,5 +2,5 @@
## Execute SQL commands ## Execute SQL commands
```bash ```bash
docker exec -it {{capplications.mariadb.hostname }} mariadb -u root -p docker exec -it {{applications.mariadb.hostname }} mariadb -u root -p
``` ```

View File

@ -8,7 +8,7 @@
- name: install MariaDB - name: install MariaDB
docker_container: docker_container:
name: "{{capplications.mariadb.hostname }}" name: "{{applications.mariadb.hostname }}"
image: "mariadb:{{applications.mariadb.version}}" #could lead to problems with nextcloud image: "mariadb:{{applications.mariadb.version}}" #could lead to problems with nextcloud
detach: yes detach: yes
env: env:
@ -38,7 +38,7 @@
- name: Wait until the MariaDB container is healthy - name: Wait until the MariaDB container is healthy
community.docker.docker_container_info: community.docker.docker_container_info:
name: "{{capplications.mariadb.hostname }}" name: "{{applications.mariadb.hostname }}"
register: db_info register: db_info
until: db_info.containers[0].State.Health.Status == "healthy" until: db_info.containers[0].State.Health.Status == "healthy"
retries: 30 retries: 30
@ -71,7 +71,7 @@
- name: Grant database privileges - name: Grant database privileges
ansible.builtin.shell: ansible.builtin.shell:
cmd: "docker exec {{capplications.mariadb.hostname }} mariadb -u root -p{{ applications.mariadb.credentials.root_password }} -e \"GRANT ALL PRIVILEGES ON {{database_name}}.* TO '{{database_username}}'@'%';\"" cmd: "docker exec {{applications.mariadb.hostname }} mariadb -u root -p{{ applications.mariadb.credentials.root_password }} -e \"GRANT ALL PRIVILEGES ON {{database_name}}.* TO '{{database_username}}'@'%';\""
args: args:
executable: /bin/bash executable: /bin/bash