mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Add mailcatcher handling
This commit is contained in:
@@ -12,5 +12,5 @@
|
||||
- php
|
||||
- xdebug
|
||||
- composer
|
||||
- app
|
||||
- mailcatcher
|
||||
- app
|
||||
|
@@ -1,2 +1,8 @@
|
||||
---
|
||||
mailcatcher_gem: mailcatcher
|
||||
mailcatcher_user: mailcatcher
|
||||
mailcatcher_smtp_ip: '0.0.0.0'
|
||||
mailcatcher_smtp_port: '1025'
|
||||
mailcatcher_http_ip: '0.0.0.0'
|
||||
mailcatcher_http_port: '1080'
|
||||
mailcatcher_log_path: '/var/log/mailcatcher'
|
||||
|
3
resources/ansible/roles/mailcatcher/handlers/main.yml
Normal file
3
resources/ansible/roles/mailcatcher/handlers/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: restart mailcatcher
|
||||
supervisorctl: name=mailcatcher state=restarted
|
@@ -0,0 +1,14 @@
|
||||
---
|
||||
- name: Create mailcatcher user
|
||||
user: name={{ mailcatcher_user }} comment='Mailcatcher Mock Smtp Service User' home='/var/spool/mailcatcher' shell='/bin/true'
|
||||
|
||||
- name: Create mailcatcher log directory
|
||||
file: path={{ mailcatcher_log_path }} owner=mailcatcher mode=0755 state=directory
|
||||
|
||||
- name: Install Mailcatcher
|
||||
gem: name={{ mailcatcher_gem }} user_install=no state=latest
|
||||
notify: restart mailcatcher
|
||||
|
||||
- name: Install mailcatcher supervisord conf
|
||||
template: src='program_mailcatcher.conf.j2' dest='/etc/supervisor/conf.d/program_mailcatcher.conf'
|
||||
notify: restart mailcatcher
|
||||
|
@@ -0,0 +1,9 @@
|
||||
[program:mailcatcher]
|
||||
command=/usr/local/bin/mailcatcher --http-ip {{ mailcatcher_http_ip }} --http-port {{ mailcatcher_http_port }} --smtp-ip {{ mailcatcher_smtp_ip }} --smtp-port {{ mailcatcher_smtp_port }} -f
|
||||
priority=100
|
||||
autostart=true
|
||||
autorestart=true
|
||||
user={{ mailcatcher_user }}
|
||||
stdout_logfile={{ mailcatcher_log_path }}/program_mailcatcher.log
|
||||
stderr_logfile={{ mailcatcher_log_path }}/program_mailcatcher.error
|
||||
environment=PATH='/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin'
|
@@ -12,6 +12,9 @@ server:
|
||||
- pkg-config
|
||||
- libzmq3-dev
|
||||
- supervisor
|
||||
- ruby-dev
|
||||
- sqlite3
|
||||
- libsqlite3-dev
|
||||
timezone: UTC
|
||||
locales:
|
||||
- en_GB.UTF-8
|
||||
@@ -51,3 +54,6 @@ xdebug:
|
||||
composer:
|
||||
install: '1'
|
||||
|
||||
mailcatcher:
|
||||
install: '1'
|
||||
|
||||
|
Reference in New Issue
Block a user