From ee401126ba2915c3a8bb4142fade4ed677c115c7 Mon Sep 17 00:00:00 2001 From: Brutus5000 Date: Mon, 14 Feb 2022 22:06:08 +0100 Subject: [PATCH] Bump faf-java-api to v2.18.1 Also add email templates --- config.template/faf-java-api/faf-java-api.env | 8 +- .../faf-java-api/mail/account-activation.html | 244 ++++++++++ .../faf-java-api/mail/password-reset.html | 237 ++++++++++ .../faf-java-api/mail/welcome-to-faf.html | 424 ++++++++++++++++++ docker-compose.yml | 3 +- 5 files changed, 908 insertions(+), 8 deletions(-) create mode 100644 config.template/faf-java-api/mail/account-activation.html create mode 100644 config.template/faf-java-api/mail/password-reset.html create mode 100644 config.template/faf-java-api/mail/welcome-to-faf.html diff --git a/config.template/faf-java-api/faf-java-api.env b/config.template/faf-java-api/faf-java-api.env index 3ab48e0b..58136a71 100644 --- a/config.template/faf-java-api/faf-java-api.env +++ b/config.template/faf-java-api/faf-java-api.env @@ -1,8 +1,6 @@ +FAF_DOMAIN=faforever.com AVATAR_ALLOWED_FILE_EXTENSIONS=png,gif AVATAR_DOWNLOAD_URL_FORMAT=http://localhost/avatars/%s -AVATAR_IMAGE_HEIGHT=20 -AVATAR_IMAGE_WIDTH=40 -AVATAR_MAX_SIZE_BYTES=4096 AVATAR_TARGET_DIRECTORY=/content/avatars ACTIVATION_URL_FORMAT=http://localhost:8020/account/activate?username=%s&token=%s API_PORT=8010 @@ -19,7 +17,6 @@ LEAGUE_DATABASE_PASSWORD=banana LEAGUE_DATABASE_USERNAME=faf-league-service EMAIL_FROM_ADDRESS=admin@localhost EMAIL_FROM_NAME=Your localhost FAF team -FEATURED_MOD_BIREUS_URL_FORMAT=http://localhost/bireus/%s FEATURED_MOD_URL_FORMAT=http://localhost/featured_mods/%s/%s FEATURED_MODS_TARGET_DIRECTORY=/content/legacy-featured-mod-files FORGED_ALLIANCE_EXE_PATH=/legacy-featured-mod-files/updates_faf_files/ForgedAlliance.exe @@ -29,7 +26,6 @@ GITHUB_WEBHOOK_SECRET=false JAVA_TOOL_OPTIONS=-Xms256m -Xmx256m JWT_PRIVATE_KEY_PATH=/pki/secret.key JWT_PUBLIC_KEY_PATH=/pki/public.key -LOG_FILE_DIRECTORY=/logs MANDRILL_API_KEY=false MAP_DOWNLOAD_URL_FORMAT=http://localhost/maps/%s MAP_LARGE_PREVIEWS_URL_FORMAT=http://localhost/maps/previews/large/%s @@ -49,10 +45,8 @@ MOD_DOWNLOAD_URL_FORMAT=http://localhost/mods/%s MOD_PREVIEW_URL_FORMAT=http://localhost/mods/thumbs/%s MOD_TARGET_DIRECTORY=/content/mods MOD_THUMBNAIL_TARGET_DIRECTORY=/content/mods/thumbs -PASSWORD_RESET_EMAIL_BODY=Dear {0},\n\na new password was requested for your user.\nIf you did not request a new password, please delete this email.\n\nOtherwise please click on the following link to reset your password:\n-----------------------\n{1}\n-----------------------\n\nThanks,\n-- The FA Forever team" PASSWORD_RESET_EMAIL_SUBJECT=FAForever - Password reset PASSWORD_RESET_URL_FORMAT=http://localhost:8000/account/confirmPasswordReset?username=%s&token=%s -REGISTRATION_EMAIL_BODY=Dear {0},\n\nwelcome to the FAForever community.\nPlease visit the following link to activate your FAF account:\n\n-----------------------\n{1}\n-----------------------\n\nThanks,\n-- The FA Forever team REGISTRATION_EMAIL_SUBJECT=FAForever - Account validation REPLAY_DOWNLOAD_URL_FORMAT=http://localhost/replays/%s REPOSITORIES_DIRECTORY=/repositories diff --git a/config.template/faf-java-api/mail/account-activation.html b/config.template/faf-java-api/mail/account-activation.html new file mode 100644 index 00000000..df7c699f --- /dev/null +++ b/config.template/faf-java-api/mail/account-activation.html @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ FAForever account activation +
+
+ +
+
+ + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+
+   +
+ + + + + + +
FAF Logo
+
+ Forged Alliance Forever +
+
+   +
+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+
+

Activate your account

+

Dear {{username}},

+

welcome to the FAForever community. To finish your registration please activate your account and select a password.

+
+ + + + + + +
Activate account
+
+

Further information will be provided to you after activation.

+
+
+

Thanks,

+

-- The FAForever team

+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + +
+
+

You don't know where this email is coming from?

+

Someone used your email address in the registration form on faforever.com. If you do not wish to be part of our community, just ignore or delete this email. No account was created yet.

+
+
+
+
+ + + +
+ + \ No newline at end of file diff --git a/config.template/faf-java-api/mail/password-reset.html b/config.template/faf-java-api/mail/password-reset.html new file mode 100644 index 00000000..79365e02 --- /dev/null +++ b/config.template/faf-java-api/mail/password-reset.html @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Password reset +
+
+ +
+
+ + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+
+   +
+ + + + + + +
FAF Logo
+
+ Forged Alliance Forever +
+
+   +
+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + + + + + + + +
+
+

Password reset

+

Dear {{username}},

+

a password reset was requested for your account. Click on the button to reset your password now.

+
+ + + + + + +
Reset password
+
+

Thanks,

+

-- The FAForever team

+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + +
+
+

If you did not request a new password or changed your mind, you can just delete this email.

+
+
+
+
+ + + +
+ + \ No newline at end of file diff --git a/config.template/faf-java-api/mail/welcome-to-faf.html b/config.template/faf-java-api/mail/welcome-to-faf.html new file mode 100644 index 00000000..c88f9e72 --- /dev/null +++ b/config.template/faf-java-api/mail/welcome-to-faf.html @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Password reset +
+
+ +
+
+ + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+
+   +
+ + + + + + +
FAF Logo
+
+ Forged Alliance Forever +
+
+   +
+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + + + + +
+
+

Welcome, {{username}}

+

you just joined FAF, how great is that! We're a rather small community so every new member is precious to us.

+

This email contains the next steps to get you started.

+

+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + + + + + + + +
+
+

Link your account to Steam

+

Before you can play games, we need to verify that you own the game. Please login to our website and link your account to Steam. Make sure your Steam profile and game list are public (you can follow this guide).

+
+ + + + + + +
Link to Steam

+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + + + + + + + +
+
+

Download our Client

+

You will need to install our client to chat with other player launch games, download maps & mods..

+
+ + + + + + +
Download FAF client

+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + +
+
+

Get help

+

Don't be afraid to ask for help. FAF isn't always straightforward. But we have plenty of resources to help you out.

+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + +
+ + + + + + +
Open FAQ
+
+ +
+ + + + + + +
+ + + + + + +
Open Wiki
+
+ +
+ + + + + + +
+ + + + + + +
Open Forum
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + + + + +

+
+
+

We hope this gives you a head start. See you on the battlefield!

+

-- The FAForever team

+
+
+
+
+ +
+ + + + + + +
+ +
+ + + + + + +
+
+

Should you ever want to delete your account, please send an email with your request to admin@faforever.com.

+
+
+
+
+ + + +
+ + \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index b948acae..949d6c6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -102,7 +102,7 @@ services: # faf-java-api: container_name: faf-java-api - image: faforever/faf-java-api:v2.17.6 + image: faforever/faf-java-api:v2.18.1 user: ${FAF_JAVA_API_USER} networks: faf: @@ -112,6 +112,7 @@ services: env_file: ./config/faf-java-api/faf-java-api.env volumes: - ./config/faf-java-api/pki:/pki + - ./config/faf-java-api/mail:/config/mail - ./data/content:/content - ./data/faf-java-api/logs:/logs - ./data/faf-java-api/repositories:/repositories