41 lines
1.2 KiB
Markdown
41 lines
1.2 KiB
Markdown
|
# Deploy Zammad via Ansible and docker-compose
|
||
|
|
||
|
## Prerequisites
|
||
|
|
||
|
* Docker and docker-compose (v1, Ansible does not support v2)
|
||
|
* Traefik v2
|
||
|
* Externally defined Docker network `traefik`
|
||
|
* Entrypoint `websecure`
|
||
|
* Certificate resolver `lehttp`
|
||
|
* PostgreSQL on host
|
||
|
* Listening on socket in `/var/run/postgresql/`
|
||
|
* Database (`zammad_database_name`, default: `zammad`) and user (`zammad_database_user`, default: `zammad`) created
|
||
|
* (To use containerized Postgres, replace `postgres` service in `roles/zammad/templates/docker-compose.yml.j2` as follows:)
|
||
|
```yaml
|
||
|
postgres:
|
||
|
image: postgres:alpine
|
||
|
restart: unless-stopped
|
||
|
environment:
|
||
|
POSTGRES_DB: '{{ zammad_database_name }}'
|
||
|
POSTGRES_PASSWORD: '{{ zammad_database_password }}'
|
||
|
POSTGRES_USER: '{{ zammad_database_user }}'
|
||
|
networks:
|
||
|
- internal
|
||
|
```
|
||
|
* enough RAM (or set `zammad_enable_search` to `no`)
|
||
|
|
||
|
## Deploy
|
||
|
|
||
|
Add target host(s) to group `zammad` in `inventory/hosts` and copy `inventory/host_vars/example` to `inventory/host_vars/{hostname}` for each host.
|
||
|
Adjust values as needed and run:
|
||
|
|
||
|
```
|
||
|
ansible-playbook -D -t zammad site.yml
|
||
|
```
|
||
|
|
||
|
### Upgrade
|
||
|
|
||
|
```
|
||
|
ansible-playbook -D -t zammad -e 'zammad_upgrade=yes' site.yml
|
||
|
```
|