mirror of
https://github.com/moparisthebest/mailiverse
synced 2024-12-21 21:08:48 -05:00
moves the hosts from the java into resource files, could be improved upon, web stuff not done
This commit is contained in:
parent
c9e5d551d8
commit
8078ebffaa
2
deploy/config.hosts
Normal file
2
deploy/config.hosts
Normal file
@ -0,0 +1,2 @@
|
||||
M_HOST_PROD=`cat config/hosts/prod`
|
||||
M_HOST_DEV=`cat config/hosts/dev`
|
4
deploy/config/hosts/.gitignore
vendored
Normal file
4
deploy/config/hosts/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
dev
|
||||
prod
|
||||
*_dev
|
||||
*_prod
|
14
deploy/config/hosts/make-dev
Executable file
14
deploy/config/hosts/make-dev
Executable file
@ -0,0 +1,14 @@
|
||||
if [ -z "$1" ]; then echo "Must supply server name as argument"; exit 0; fi
|
||||
|
||||
dev=$1
|
||||
|
||||
echo $dev > primary_dev
|
||||
echo $dev:8080 > tomcat_dev
|
||||
echo $dev:8000 > web_dev
|
||||
echo $dev > auth_dev
|
||||
echo $dev > dev
|
||||
|
||||
echo "127.0.0.1" > local_db_dev
|
||||
echo "127.0.0.1" > local_key_dev
|
||||
echo "127.0.0.1" > local_mail_dev
|
||||
echo "127.0.0.1" > local_smtp_dev
|
14
deploy/config/hosts/make-prod
Executable file
14
deploy/config/hosts/make-prod
Executable file
@ -0,0 +1,14 @@
|
||||
if [ -z "$1" ]; then echo "Must supply server name (mailiverse.com) as argument"; exit 0; fi
|
||||
|
||||
prod=$1
|
||||
|
||||
echo $prod > prod
|
||||
echo $prod > primary_prod
|
||||
echo $prod > web_prod
|
||||
echo mail.$prod > tomcat_prod
|
||||
echo mail.$prod > auth_prod
|
||||
echo mail.$prod > local_mail_prod
|
||||
|
||||
echo "127.0.0.1" > local_db_prod
|
||||
echo "127.0.0.1" > local_key_prod
|
||||
echo "127.0.0.1" > local_smtp_prod
|
@ -1,2 +0,0 @@
|
||||
M_HOST_PROD="your-prod"
|
||||
M_HOST_DEV="ec2-54-234-177-43.compute-1.amazonaws.com"
|
1
deploy/james/resources/hosts/auth_dev
Symbolic link
1
deploy/james/resources/hosts/auth_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_dev
|
1
deploy/james/resources/hosts/auth_prod
Symbolic link
1
deploy/james/resources/hosts/auth_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_prod
|
1
deploy/james/resources/hosts/local_db_dev
Symbolic link
1
deploy/james/resources/hosts/local_db_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_dev
|
1
deploy/james/resources/hosts/local_db_prod
Symbolic link
1
deploy/james/resources/hosts/local_db_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_prod
|
1
deploy/james/resources/hosts/local_key_dev
Symbolic link
1
deploy/james/resources/hosts/local_key_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_dev
|
1
deploy/james/resources/hosts/local_key_prod
Symbolic link
1
deploy/james/resources/hosts/local_key_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_prod
|
1
deploy/james/resources/hosts/local_mail_dev
Symbolic link
1
deploy/james/resources/hosts/local_mail_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_dev
|
1
deploy/james/resources/hosts/local_mail_prod
Symbolic link
1
deploy/james/resources/hosts/local_mail_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_prod
|
1
deploy/james/resources/hosts/local_smtp_dev
Symbolic link
1
deploy/james/resources/hosts/local_smtp_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_dev
|
1
deploy/james/resources/hosts/local_smtp_prod
Symbolic link
1
deploy/james/resources/hosts/local_smtp_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_prod
|
1
deploy/james/resources/hosts/primary_dev
Symbolic link
1
deploy/james/resources/hosts/primary_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_dev
|
1
deploy/james/resources/hosts/primary_prod
Symbolic link
1
deploy/james/resources/hosts/primary_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_prod
|
1
deploy/james/resources/hosts/tomcat_dev
Symbolic link
1
deploy/james/resources/hosts/tomcat_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_dev
|
1
deploy/james/resources/hosts/tomcat_prod
Symbolic link
1
deploy/james/resources/hosts/tomcat_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_prod
|
1
deploy/james/resources/hosts/web_dev
Symbolic link
1
deploy/james/resources/hosts/web_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_dev
|
1
deploy/james/resources/hosts/web_prod
Symbolic link
1
deploy/james/resources/hosts/web_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_prod
|
1
deploy/mail-key/resources/hosts/auth_dev
Symbolic link
1
deploy/mail-key/resources/hosts/auth_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_dev
|
1
deploy/mail-key/resources/hosts/auth_prod
Symbolic link
1
deploy/mail-key/resources/hosts/auth_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_prod
|
1
deploy/mail-key/resources/hosts/local_db_dev
Symbolic link
1
deploy/mail-key/resources/hosts/local_db_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_dev
|
1
deploy/mail-key/resources/hosts/local_db_prod
Symbolic link
1
deploy/mail-key/resources/hosts/local_db_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_prod
|
1
deploy/mail-key/resources/hosts/local_key_dev
Symbolic link
1
deploy/mail-key/resources/hosts/local_key_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_dev
|
1
deploy/mail-key/resources/hosts/local_key_prod
Symbolic link
1
deploy/mail-key/resources/hosts/local_key_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_prod
|
1
deploy/mail-key/resources/hosts/local_mail_dev
Symbolic link
1
deploy/mail-key/resources/hosts/local_mail_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_dev
|
1
deploy/mail-key/resources/hosts/local_mail_prod
Symbolic link
1
deploy/mail-key/resources/hosts/local_mail_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_prod
|
1
deploy/mail-key/resources/hosts/local_smtp_dev
Symbolic link
1
deploy/mail-key/resources/hosts/local_smtp_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_dev
|
1
deploy/mail-key/resources/hosts/local_smtp_prod
Symbolic link
1
deploy/mail-key/resources/hosts/local_smtp_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_prod
|
1
deploy/mail-key/resources/hosts/primary_dev
Symbolic link
1
deploy/mail-key/resources/hosts/primary_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_dev
|
1
deploy/mail-key/resources/hosts/primary_prod
Symbolic link
1
deploy/mail-key/resources/hosts/primary_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_prod
|
1
deploy/mail-key/resources/hosts/tomcat_dev
Symbolic link
1
deploy/mail-key/resources/hosts/tomcat_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_dev
|
1
deploy/mail-key/resources/hosts/tomcat_prod
Symbolic link
1
deploy/mail-key/resources/hosts/tomcat_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_prod
|
1
deploy/mail-key/resources/hosts/web_dev
Symbolic link
1
deploy/mail-key/resources/hosts/web_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_dev
|
1
deploy/mail-key/resources/hosts/web_prod
Symbolic link
1
deploy/mail-key/resources/hosts/web_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_prod
|
1
deploy/mail-user/resources/hosts/auth_dev
Symbolic link
1
deploy/mail-user/resources/hosts/auth_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_dev
|
1
deploy/mail-user/resources/hosts/auth_prod
Symbolic link
1
deploy/mail-user/resources/hosts/auth_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_prod
|
1
deploy/mail-user/resources/hosts/local_db_dev
Symbolic link
1
deploy/mail-user/resources/hosts/local_db_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_dev
|
1
deploy/mail-user/resources/hosts/local_db_prod
Symbolic link
1
deploy/mail-user/resources/hosts/local_db_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_prod
|
1
deploy/mail-user/resources/hosts/local_key_dev
Symbolic link
1
deploy/mail-user/resources/hosts/local_key_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_dev
|
1
deploy/mail-user/resources/hosts/local_key_prod
Symbolic link
1
deploy/mail-user/resources/hosts/local_key_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_prod
|
1
deploy/mail-user/resources/hosts/local_mail_dev
Symbolic link
1
deploy/mail-user/resources/hosts/local_mail_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_dev
|
1
deploy/mail-user/resources/hosts/local_mail_prod
Symbolic link
1
deploy/mail-user/resources/hosts/local_mail_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_prod
|
1
deploy/mail-user/resources/hosts/local_smtp_dev
Symbolic link
1
deploy/mail-user/resources/hosts/local_smtp_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_dev
|
1
deploy/mail-user/resources/hosts/local_smtp_prod
Symbolic link
1
deploy/mail-user/resources/hosts/local_smtp_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_prod
|
1
deploy/mail-user/resources/hosts/primary_dev
Symbolic link
1
deploy/mail-user/resources/hosts/primary_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_dev
|
1
deploy/mail-user/resources/hosts/primary_prod
Symbolic link
1
deploy/mail-user/resources/hosts/primary_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_prod
|
1
deploy/mail-user/resources/hosts/tomcat_dev
Symbolic link
1
deploy/mail-user/resources/hosts/tomcat_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_dev
|
1
deploy/mail-user/resources/hosts/tomcat_prod
Symbolic link
1
deploy/mail-user/resources/hosts/tomcat_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_prod
|
1
deploy/mail-user/resources/hosts/web_dev
Symbolic link
1
deploy/mail-user/resources/hosts/web_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_dev
|
1
deploy/mail-user/resources/hosts/web_prod
Symbolic link
1
deploy/mail-user/resources/hosts/web_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_prod
|
1
deploy/tomcat/resources/hosts/auth_dev
Symbolic link
1
deploy/tomcat/resources/hosts/auth_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_dev
|
1
deploy/tomcat/resources/hosts/auth_prod
Symbolic link
1
deploy/tomcat/resources/hosts/auth_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_prod
|
1
deploy/tomcat/resources/hosts/local_db_dev
Symbolic link
1
deploy/tomcat/resources/hosts/local_db_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_dev
|
1
deploy/tomcat/resources/hosts/local_db_prod
Symbolic link
1
deploy/tomcat/resources/hosts/local_db_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_prod
|
1
deploy/tomcat/resources/hosts/local_key_dev
Symbolic link
1
deploy/tomcat/resources/hosts/local_key_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_dev
|
1
deploy/tomcat/resources/hosts/local_key_prod
Symbolic link
1
deploy/tomcat/resources/hosts/local_key_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_prod
|
1
deploy/tomcat/resources/hosts/local_mail_dev
Symbolic link
1
deploy/tomcat/resources/hosts/local_mail_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_dev
|
1
deploy/tomcat/resources/hosts/local_mail_prod
Symbolic link
1
deploy/tomcat/resources/hosts/local_mail_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_prod
|
1
deploy/tomcat/resources/hosts/local_smtp_dev
Symbolic link
1
deploy/tomcat/resources/hosts/local_smtp_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_dev
|
1
deploy/tomcat/resources/hosts/local_smtp_prod
Symbolic link
1
deploy/tomcat/resources/hosts/local_smtp_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_prod
|
1
deploy/tomcat/resources/hosts/primary_dev
Symbolic link
1
deploy/tomcat/resources/hosts/primary_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_dev
|
1
deploy/tomcat/resources/hosts/primary_prod
Symbolic link
1
deploy/tomcat/resources/hosts/primary_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_prod
|
1
deploy/tomcat/resources/hosts/tomcat_dev
Symbolic link
1
deploy/tomcat/resources/hosts/tomcat_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_dev
|
1
deploy/tomcat/resources/hosts/tomcat_prod
Symbolic link
1
deploy/tomcat/resources/hosts/tomcat_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_prod
|
1
deploy/tomcat/resources/hosts/web_dev
Symbolic link
1
deploy/tomcat/resources/hosts/web_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_dev
|
1
deploy/tomcat/resources/hosts/web_prod
Symbolic link
1
deploy/tomcat/resources/hosts/web_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_prod
|
1
deploy/tools/resources/hosts/auth_dev
Symbolic link
1
deploy/tools/resources/hosts/auth_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_dev
|
1
deploy/tools/resources/hosts/auth_prod
Symbolic link
1
deploy/tools/resources/hosts/auth_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/auth_prod
|
1
deploy/tools/resources/hosts/local_db_dev
Symbolic link
1
deploy/tools/resources/hosts/local_db_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_dev
|
1
deploy/tools/resources/hosts/local_db_prod
Symbolic link
1
deploy/tools/resources/hosts/local_db_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_db_prod
|
1
deploy/tools/resources/hosts/local_key_dev
Symbolic link
1
deploy/tools/resources/hosts/local_key_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_dev
|
1
deploy/tools/resources/hosts/local_key_prod
Symbolic link
1
deploy/tools/resources/hosts/local_key_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_key_prod
|
1
deploy/tools/resources/hosts/local_mail_dev
Symbolic link
1
deploy/tools/resources/hosts/local_mail_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_dev
|
1
deploy/tools/resources/hosts/local_mail_prod
Symbolic link
1
deploy/tools/resources/hosts/local_mail_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_mail_prod
|
1
deploy/tools/resources/hosts/local_smtp_dev
Symbolic link
1
deploy/tools/resources/hosts/local_smtp_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_dev
|
1
deploy/tools/resources/hosts/local_smtp_prod
Symbolic link
1
deploy/tools/resources/hosts/local_smtp_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/local_smtp_prod
|
1
deploy/tools/resources/hosts/primary_dev
Symbolic link
1
deploy/tools/resources/hosts/primary_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_dev
|
1
deploy/tools/resources/hosts/primary_prod
Symbolic link
1
deploy/tools/resources/hosts/primary_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/primary_prod
|
1
deploy/tools/resources/hosts/tomcat_dev
Symbolic link
1
deploy/tools/resources/hosts/tomcat_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_dev
|
1
deploy/tools/resources/hosts/tomcat_prod
Symbolic link
1
deploy/tools/resources/hosts/tomcat_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/tomcat_prod
|
1
deploy/tools/resources/hosts/web_dev
Symbolic link
1
deploy/tools/resources/hosts/web_dev
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_dev
|
1
deploy/tools/resources/hosts/web_prod
Symbolic link
1
deploy/tools/resources/hosts/web_prod
Symbolic link
@ -0,0 +1 @@
|
||||
../../../config/hosts/web_prod
|
1
install/.gitignore
vendored
Normal file
1
install/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
setup-mysql.sql
|
@ -1,6 +1,6 @@
|
||||
CREATE DATABASE mail CHARACTER SET utf8;
|
||||
CREATE DATABASE mail_extra CHARACTER SET utf8;
|
||||
CREATE DATABASE captcha CHARACTER SET utf8;
|
||||
CREATE DATABASE mail DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
|
||||
CREATE DATABASE mail_extra DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
|
||||
CREATE DATABASE captcha DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
|
||||
CREATE DATABASE james CHARACTER SET utf8;
|
||||
|
||||
CREATE USER 'mail'@'localhost' IDENTIFIED BY 'MAIL_PASSWORD';
|
||||
@ -8,7 +8,7 @@ CREATE USER 'mail_extra'@'localhost' IDENTIFIED BY 'MAIL_EXTRA_PASSWORD';
|
||||
CREATE USER 'captcha'@'localhost' IDENTIFIED BY 'CAPTCHA_PASSWORD';
|
||||
CREATE USER 'james'@'localhost' IDENTIFIED BY 'JAMES_PASSWORD';
|
||||
|
||||
GRANT ALL PRIVILEGES ON *.mail TO 'mail'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON *.mail_extra TO 'mail_extra'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON *.captcha TO 'captcha'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON *.james TO 'james'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON mail.* TO 'mail'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON mail_extra.* TO 'mail_extra'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON captcha.* TO 'captcha'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON james.* TO 'james'@'localhost';
|
||||
|
@ -1,5 +1,7 @@
|
||||
package core.constants;
|
||||
|
||||
import core.util.Hosts;
|
||||
|
||||
public class ConstantsClientPlatform
|
||||
{
|
||||
public static final boolean DEBUG = false;
|
||||
@ -10,17 +12,17 @@ public class ConstantsClientPlatform
|
||||
{
|
||||
if (DEBUG)
|
||||
{
|
||||
HOST = "mailiverse.com";
|
||||
AUTH_HOST = "red";
|
||||
TOMCAT_HOST = "YOUR_DEV_TOMCAT:8080";
|
||||
WEB_HOST = "YOUR_DEV_WEB:8000";
|
||||
HOST = Hosts.getHostFor("primary_dev");
|
||||
AUTH_HOST = Hosts.getHostFor("auth_dev");
|
||||
TOMCAT_HOST = Hosts.getHostFor("tomcat_dev");
|
||||
WEB_HOST = Hosts.getHostFor("web_dev");
|
||||
}
|
||||
else
|
||||
{
|
||||
HOST = "mailiverse.com";
|
||||
AUTH_HOST = "mail.mailiverse.com";
|
||||
TOMCAT_HOST = "mail.mailiverse.com";
|
||||
WEB_HOST = "www.mailiverse.com";
|
||||
HOST = Hosts.getHostFor("primary_prod");
|
||||
AUTH_HOST = Hosts.getHostFor("auth_prod");
|
||||
TOMCAT_HOST = Hosts.getHostFor("tomcat_prod");
|
||||
WEB_HOST = Hosts.getHostFor("web_prod");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,14 @@
|
||||
package core.constants;
|
||||
|
||||
import core.util.Hosts;
|
||||
|
||||
public class ConstantsServer
|
||||
{
|
||||
public static final boolean DEBUG = System.getenv("PRODUCTION")==null;
|
||||
|
||||
public static final String LOCAL_MAIL_SERVER, DBCONNECTION_PREFIX;
|
||||
public static final String KEY_SERVER;
|
||||
public static final String LOCAL_SMTP_HOST;
|
||||
|
||||
static
|
||||
{
|
||||
@ -13,26 +16,27 @@ public class ConstantsServer
|
||||
{
|
||||
System.out.println("Running DEBUG Mode");
|
||||
|
||||
LOCAL_MAIL_SERVER = "red";
|
||||
DBCONNECTION_PREFIX = "jdbc:mysql://red/";
|
||||
KEY_SERVER = "red";
|
||||
LOCAL_MAIL_SERVER = Hosts.getHostFor("local_mail_dev");
|
||||
DBCONNECTION_PREFIX = "jdbc:mysql://" + Hosts.getHostFor("local_db_dev") + "/";
|
||||
KEY_SERVER = Hosts.getHostFor("local_key_dev");
|
||||
LOCAL_SMTP_HOST = Hosts.getHostFor("local_smtp_dev");
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("Running PRODUCTION Mode");
|
||||
|
||||
KEY_SERVER = "localhost";
|
||||
KEY_SERVER = Hosts.getHostFor("local_key_prod");
|
||||
|
||||
// the mail server has to be the full name, or else the SSL certificate fails
|
||||
LOCAL_MAIL_SERVER = "mail.mailiverse.com";
|
||||
DBCONNECTION_PREFIX = "jdbc:mysql://localhost/";
|
||||
LOCAL_MAIL_SERVER = Hosts.getHostFor("local_mail_prod");
|
||||
DBCONNECTION_PREFIX = "jdbc:mysql://" + Hosts.getHostFor("local_db_prod") + "/";
|
||||
LOCAL_SMTP_HOST = Hosts.getHostFor("local_smtp_prod");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String SMTP_HOST = LOCAL_MAIL_SERVER;
|
||||
public static final int SMTP_PORT = 25;
|
||||
|
||||
public static final String LOCAL_SMTP_HOST = "YOUR_LOCAL_SMTP_HOST";
|
||||
public static final String LOCAL_SMTP_PORT = "10025";
|
||||
|
||||
public static final String KEY_AUTH_HOST = KEY_SERVER;
|
||||
|
17
java/core/src/core/util/Hosts.java
Normal file
17
java/core/src/core/util/Hosts.java
Normal file
@ -0,0 +1,17 @@
|
||||
package core.util;
|
||||
|
||||
public class Hosts
|
||||
{
|
||||
public static String getHostFor (String key)
|
||||
{
|
||||
try
|
||||
{
|
||||
return ExternalResource.getTrimmedString("hosts/" + key);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException("Internal error. #9204 " + key);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -25,15 +25,13 @@ public class ProxySelectorRegex extends ProxySelector
|
||||
"localhost",
|
||||
"127\\.0.*",
|
||||
"192\\.168\\.1\\..*",
|
||||
".*piratemail\\.se",
|
||||
"blue",
|
||||
".*mailiverse\\.com",
|
||||
".*\\.dropbox\\.com",
|
||||
"s3\\.amazonaws\\.com",
|
||||
"s3\\.amazonaws\\.com\\.",
|
||||
".*\\.s3\\.amazonaws\\.com",
|
||||
".*\\.s3\\.amazonaws\\.com\\.",
|
||||
".*\\.push\\.apple\\.com"
|
||||
".*\\.push\\.apple\\.com",
|
||||
".*" + (Hosts.getHostFor("primary_prod").replace(".", "\\."))
|
||||
} ;
|
||||
|
||||
List<Proxy> NoProxy = Arrays.asList(new Proxy[] { Proxy.NO_PROXY });
|
||||
|
Loading…
Reference in New Issue
Block a user