Skip to content
Snippets Groups Projects
Commit b63e90e5 authored by Thomas Citharel's avatar Thomas Citharel
Browse files

Merge branch 'docker/smtp' into 'develop'

Add development SMTP server in docker-compose

See merge request framasoft/framadate/framadate!391
parents c9382973 e03ad973
No related branches found
No related tags found
No related merge requests found
version: '3'
services:
smtp:
container_name: framadate-smtp
image: jeanberu/mailcatcher
ports:
- "1080:1080"
db:
container_name: framadate-db
image: mysql:5.7
......@@ -19,6 +25,7 @@ services:
context: .
depends_on:
- db
- smtp
ports:
- 80:80
environment:
......@@ -32,8 +39,9 @@ services:
- MYSQL_PORT=3307
- ADMIN_USER=admin
- ADMIN_PASSWORD=adminpassword
- DISABLE_SMTP=true
- APACHE_RUN_USER=#1000
- FRAMADATE_DEVMODE=1
- SMTP_SERVER=smtp:1025
restart: always
volumes:
- '.:/var/www/framadate'
......@@ -38,6 +38,7 @@ if [ ! -f $FRAMADATE_CONFIG ]; then
if [ "$DISABLE_SMTP" = "true" ]; then
sed -i -E "s/'use_smtp' => true,/'use_smtp' => false,/g" $FRAMADATE_CONFIG
fi
sed -i -E "s/SMTP_SERVER/${SMTP_SERVER:-localhost}/g" $FRAMADATE_CONFIG
# Framadate internal config
sed -i -E "s/^(\/\/ )?const TABLENAME_PREFIX( )?=.*;/const TABLENAME_PREFIX = 'fd_';/g" $FRAMADATE_CONFIG
sed -i -E "s/^(\/\/ )?const MIGRATION_TABLE( )?=.*;/const MIGRATION_TABLE = 'framadate_migration';/g" $FRAMADATE_CONFIG
......
......@@ -107,7 +107,7 @@ $config = [
'use_smtp' => true, // use email for polls creation/modification/responses notification (uses smtp only if `use_sendmail` is disabled)
'use_sendmail' => false, // use sendmail instead of smtp
'smtp_options' => [
'host' => 'localhost', // SMTP server (you could add many servers (main and backup for example) : use ";" like separator
'host' => 'SMTP_SERVER', // SMTP server (you could add many servers (main and backup for example) : use ";" like separator
'auth' => false, // Enable SMTP authentication
'username' => '', // SMTP username
'password' => '', // SMTP password
......@@ -125,4 +125,3 @@ $config = [
'markdown_editor_by_default' => true, // The markdown editor for the description is enabled by default
'provide_fork_awesome' => true, // Whether the build-in fork-awesome should be provided
];
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment