mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-24 21:51:03 +01:00
Compare commits
4 Commits
ab82afa7b9
...
ba82ebce3c
Author | SHA1 | Date | |
---|---|---|---|
ba82ebce3c | |||
eea02572d9 | |||
4e30054a8f | |||
cc0e67dc23 |
@ -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:
|
command:
|
||||||
cmd: "./launcher rebuild {{discourse_application_container}}"
|
cmd: "./launcher rebuild {{discourse_application_container}}"
|
||||||
chdir: "{{discourse_repository_directory}}"
|
chdir: "{{discourse_repository_directory}}"
|
||||||
|
listen: recreate discourse
|
@ -48,17 +48,12 @@
|
|||||||
dest: "{{discourse_repository_directory}}containers/discourse_application.yml"
|
dest: "{{discourse_repository_directory}}containers/discourse_application.yml"
|
||||||
notify: recreate discourse
|
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"
|
- name: "destroy container discourse_application"
|
||||||
command:
|
command:
|
||||||
cmd: "./launcher destroy discourse_application"
|
cmd: "./launcher destroy discourse_application"
|
||||||
chdir: "{{discourse_repository_directory}}"
|
chdir: "{{discourse_repository_directory}}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
notify: recreate discourse
|
||||||
when: mode_reset | bool
|
when: mode_reset | bool
|
||||||
|
|
||||||
- name: flush, to recreate discourse app
|
- name: flush, to recreate discourse app
|
||||||
|
@ -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_username`: The username for the database user.
|
||||||
- `database_password`: The password 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
|
## Contributing
|
||||||
Contributions to this project are welcome. Please submit issues and pull requests with your suggestions.
|
Contributions to this project are welcome. Please submit issues and pull requests with your suggestions.
|
||||||
|
@ -10,6 +10,11 @@ To gain shell access to the application container, run the following command:
|
|||||||
docker-compose exec -it application bash
|
docker-compose exec -it application bash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Clear Cache
|
||||||
|
```bash
|
||||||
|
docker compose exec -it application php artisan cache:clear
|
||||||
|
```
|
||||||
|
|
||||||
### Database Access
|
### Database Access
|
||||||
To access the MariaDB instance in the database container, run the following command:
|
To access the MariaDB instance in the database container, run the following command:
|
||||||
```bash
|
```bash
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
src: update-docker.service.j2
|
src: update-docker.service.j2
|
||||||
dest: /etc/systemd/system/update-docker.cymais.service
|
dest: /etc/systemd/system/update-docker.cymais.service
|
||||||
|
|
||||||
- name: "reload update-docker.cymais.service"
|
- name: "restart update-docker.cymais.service"
|
||||||
systemd:
|
systemd:
|
||||||
name: update-docker.cymais.service
|
name: update-docker.cymais.service
|
||||||
state: reloaded
|
state: restarted
|
||||||
enabled: yes
|
enabled: yes
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
Loading…
Reference in New Issue
Block a user