Skip to content

Commit 53cd28f

Browse files
committed
Add initial synchronisation with Mailman
This allows syncronisation of mailing list ids from Mailman and they can then be added to a mailing list. At this point there is no actual synchronisation of memberships.
1 parent 70ebb60 commit 53cd28f

28 files changed

+609
-101
lines changed

.env.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ MAIL_TO_SUBSCRIPTION_NAME='Secretary of GEWIS'
5555
5656
MAIL_FROM_SECRETARY_NAME='Secretary of GEWIS'
5757

58+
MAILMAN_API_ENDPOINT=http://mailmanc:8001/3.1/
59+
MAILMAN_API_USERNAME=restadmin
60+
MAILMAN_API_PASSWORD=restpass
61+
5862
# LDAP settings (fill in to enable LDAP)
5963
LDAP_SERVERS=ldaps.gewis.nl
6064
LDAP_STARTTLS=true

.idea/gewisdb.iml

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"require": {
1212
"php": "^8.3.0",
1313
"ext-intl": "*",
14+
"ext-memcached": "^3.2",
1415
"ext-pdo_pgsql": "*",
1516
"ext-pgsql": "*",
1617
"ext-zend-opcache": "*",
@@ -52,7 +53,9 @@
5253
"doctrine/doctrine-laminas-hydrator": "^3.4.0",
5354
"monolog/monolog": "^1.27.1",
5455
"cweagans/composer-patches": "^1.7.3",
55-
"stripe/stripe-php": "^10.21"
56+
"stripe/stripe-php": "^10.21",
57+
"laminas/laminas-cache": "^3.12.1",
58+
"laminas/laminas-cache-storage-adapter-memcached": "^2.5.0"
5659
},
5760
"require-dev": {
5861
"laminas/laminas-component-installer": "^3.4.0",

composer.lock

Lines changed: 72 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/autoload/local.development.php.dist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ return [
6868
],
6969
],
7070

71+
/**
72+
* Mailman REST API configuration.
73+
*/
74+
'mailman_api' => [
75+
'endpoint' => getenv('MAILMAN_API_ENDPOINT'),
76+
'username' => getenv('MAILMAN_API_USERNAME'),
77+
'password' => getenv('MAILMAN_API_PASSWORD'),
78+
],
79+
7180
/**
7281
* LDAP settings for login to database frontend
7382
*/

config/autoload/local.production.php.dist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ return [
6868
],
6969
],
7070

71+
/**
72+
* Mailman REST API configuration.
73+
*/
74+
'mailman_api' => [
75+
'endpoint' => getenv('MAILMAN_API_ENDPOINT'),
76+
'username' => getenv('MAILMAN_API_USERNAME'),
77+
'password' => getenv('MAILMAN_API_PASSWORD'),
78+
],
79+
7180
/**
7281
* LDAP settings for login to database frontend
7382
*/

config/modules.config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
'DoctrineORMModule',
2727
'Laminas\Cache\Storage\Adapter\Filesystem',
2828
'Laminas\Cache\Storage\Adapter\Memory',
29+
'Laminas\Cache\Storage\Adapter\Memcached',
2930
'Application',
3031
'Database',
3132
'Checker',

docker-compose.override.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ services:
3434
mailman-core:
3535
image: maxking/mailman-core:0.4
3636
container_name: mailman-core
37-
hostname: mailman-core
37+
hostname: mailmanc
3838
volumes:
3939
- ./mailman/core:/opt/mailman/
4040
depends_on:
@@ -51,7 +51,7 @@ services:
5151
mailman-web:
5252
image: maxking/mailman-web:0.4
5353
container_name: mailman-web
54-
hostname: mailman-web
54+
hostname: mailmanw
5555
depends_on:
5656
- postgresql
5757
volumes:

docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,20 @@ services:
5555
# - STRIPE_CANCEL_URL=
5656
# - STRIPE_SUCCESS_URL=
5757
depends_on:
58+
- memcached
5859
- postfix
5960
volumes:
6061
- gewisdb_data:/code/data:rw
6162
- gewisdb_public:/code/public:rw
6263
networks:
6364
- gewisdb_network
6465
restart: unless-stopped
66+
memcached:
67+
image: memcached:alpine
68+
entrypoint: [ 'memcached', '-m 256' ]
69+
networks:
70+
- gewisdb_network
71+
restart: unless-stopped
6572
postfix:
6673
image: juanluisbaptiste/postfix
6774
env_file:

0 commit comments

Comments
 (0)