Skip to content

Commit

Permalink
Merge pull request #1320 from proditis/master
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
proditis authored Nov 19, 2024
2 parents 2e3b20f + 2754d74 commit 0c97945
Show file tree
Hide file tree
Showing 5 changed files with 318 additions and 313 deletions.
22 changes: 17 additions & 5 deletions ansible/runonce/pui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,21 +361,33 @@
'username' => 'participantUI',
'password' => 'participantUI',
'charset' => 'utf8mb4',
'enableSchemaCache' => true,
'schemaCacheDuration' => 0,
'schemaCache' => 'cache',
'enableQueryCache'=>true,
'queryCache'=>'qcache',
'queryCacheDuration'=>60,
'enableSchemaCache' => true,
'enableQueryCache'=>true,
//'schemaCache' => 'qcache',
//'queryCache'=>'qcache',
];
tags:
- conf

- name: "Create participant/config/cache.php"
copy:
content: "<?php return [ 'class' => 'yii\\caching\\MemCache', 'useMemcached' => true, 'servers' => [['host' => '{{db_ip}}','port' => 11211, 'weight' => 60]]];\n"
dest: "/home/participantUI/{{domain_name}}/frontend/config/cache.php"
mode: '0444'
content: |
<?php
return [
'class' => 'yii\\caching\\MemCache',
'useMemcached' => true,
'servers' => [
[
'host' => '{{db_ip}}',
'port' => 11211,
'weight' => 60
]
]
];
tags:
- conf

Expand Down
18 changes: 18 additions & 0 deletions docs/Gmail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Configure echoCTF.RED to use Google Mail
In order to configure echoCTF.RED to use a GMail account for sending emails you first have to configure the GMail account.

1. Go to https://myaccount.google.com/
2. Enable 2-step verification
3. Go to https://myaccount.google.com/apppasswords (NOTE: this do not work without 2-step verification)
4. Create an application ie `myplatform`
5. Copy the generated app password, it will look something like `blah blah blah blah`
6. Go to your echoCTF backend Settings => Configure
7. Scroll to the Mail Setting section and add something like the following
```
gmail+smtp://YOUR_GOOGLE_MAIL:APP_PASSWORD@default?local_domain=YOUR_DOMAIN&verify_peer=0
```
1. Replace `YOUR_GOOGLE_MAIL` with your gmail eg `[email protected]`
2. Replace `APP_PASSWORD` with the application password you copied from step 5 but without spaces in between eg `blahblahblahblah`
3. Replace `YOUR_DOMAIN` with your platform frontend domain eg `ctf.blah.io`
8. Press Save
9. Execute `composer require symfony/google-mailer` from your `frontend` and `backend` system folders
7 changes: 4 additions & 3 deletions frontend/config/db-local.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
//'enableParamLogging'=>true,
// Schema cache options (for production environment)
'enableSchemaCache' => true,
'schemaCacheDuration' => 0,
'schemaCache' => 'cache',
'enableQueryCache' => true,
'queryCache'=>'qcache',
'schemaCacheDuration' => 0,
'queryCacheDuration'=>60,
// You can have multiple caches defined for queries
//'queryCache'=>'qcache',
//'schemaCache' => 'cache',
// 'on afterOpen' => function($event) {
// $event->sender->createCommand("SET time_zone='+00:00'")->execute();
// },
Expand Down
Loading

0 comments on commit 0c97945

Please sign in to comment.