Compare commits

...

4 Commits

5 changed files with 30 additions and 9 deletions

View File

@ -1,5 +1,21 @@
---
- name: recreate discourse
- name: "stop and remove discourse container if it exist"
docker_container:
name: "{{discourse_application_container}}"
state: absent
register: container_action
failed_when: container_action.failed and 'No such container' not in container_action.msg
listen: recreate discourse
- name: "add central database temporary to {{docker_compose_project_name}}_default"
command:
cmd: "docker network connect discourse_default central-{{ database_type }}"
ignore_errors: true
when: enable_central_database | bool
listen: recreate discourse
- name: rebuild discourse
command:
cmd: "./launcher rebuild {{discourse_application_container}}"
chdir: "{{discourse_repository_directory}}"
listen: recreate discourse

View File

@ -48,17 +48,12 @@
dest: "{{discourse_repository_directory}}containers/discourse_application.yml"
notify: recreate discourse
- name: "add central database temporary to {{docker_compose_project_name}}_default"
command:
cmd: "docker network connect discourse_default central-{{ database_type }}"
ignore_errors: true
when: enable_central_database | bool
- name: "destroy container discourse_application"
command:
cmd: "./launcher destroy discourse_application"
chdir: "{{discourse_repository_directory}}"
ignore_errors: true
notify: recreate discourse
when: mode_reset | bool
- name: flush, to recreate discourse app

View File

@ -23,5 +23,10 @@ Configure the role by setting the required variables. These can be set in the pl
- `database_username`: The username for the database user.
- `database_password`: The password for the database user.
## Execute SQL commands
```bash
docker exec -it central-mariadb mysql -u root -p
```
## Contributing
Contributions to this project are welcome. Please submit issues and pull requests with your suggestions.

View File

@ -10,6 +10,11 @@ To gain shell access to the application container, run the following command:
docker-compose exec -it application bash
```
### Clear Cache
```bash
docker compose exec -it application php artisan cache:clear
```
### Database Access
To access the MariaDB instance in the database container, run the following command:
```bash

View File

@ -14,9 +14,9 @@
src: update-docker.service.j2
dest: /etc/systemd/system/update-docker.cymais.service
- name: "reload update-docker.cymais.service"
- name: "restart update-docker.cymais.service"
systemd:
name: update-docker.cymais.service
state: reloaded
state: restarted
enabled: yes
daemon_reload: yes