Compare commits
8 commits
11b2e42637
...
74e87af1fb
Author | SHA1 | Date | |
---|---|---|---|
Jesper Hess | 74e87af1fb | ||
Víðir Valberg Guðmundsson | f4054dcb01 | ||
Víðir Valberg Guðmundsson | 24d91d36af | ||
Víðir Valberg Guðmundsson | cdfa00d453 | ||
Víðir Valberg Guðmundsson | 4f88f200b1 | ||
Víðir Valberg Guðmundsson | d678b15085 | ||
Víðir Valberg Guðmundsson | 92f8d4b0c4 | ||
Víðir Valberg Guðmundsson | 824bc583a1 |
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
BASE_CMD="ansible-playbook playbook.yml -i datacoop_hosts --ask-vault-pass"
|
||||
BASE_CMD="ansible-playbook playbook.yml -i datacoop_hosts --vault-password-file ~/.vault_password_file"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Deploying all!"
|
||||
|
|
|
@ -1,73 +1,87 @@
|
|||
$ANSIBLE_VAULT;1.1;AES256
|
||||
34376131343263336262656463373830643861336631626539643663333239313831626236306530
|
||||
3335623130653432636133356363656465346366303062370a346130326536366638633536613161
|
||||
62623334363537636634373231353564396362343330623562383939373538633066616565306235
|
||||
3332323863353334640a396462313862366362366535383737376333383361303065383937396530
|
||||
38326331396333396263363762346331356431623532343938613834663830393337646666336435
|
||||
66356439333434356165613030306138666163653934386233663362646534303737323030636234
|
||||
31616132613830363136666639386462363135656432373236393034316664363637663336366435
|
||||
64373238633064623735666335636231656231666434383066313336303137333663333031363638
|
||||
31643733336535383338376631656439633962653262356335383638373764353530643234303935
|
||||
62383930393634613530643739643335616164633038326638356135623561326165376530363461
|
||||
37373032393331653261373538633065333662393366666161396638383932393331623766343035
|
||||
30333335663039323931306162313538373334393335306132626336643363323839633761383063
|
||||
35343632363837383132656437303138303764316439343663303964396463363638336533653930
|
||||
39303236353766373131623363653835666439333164366563346164626464633633363163323864
|
||||
65363961393237666433623565343832306663323862666333343665376135646132363466616364
|
||||
62356331666432336661343762333961333634396466333465633164326239386266643230393566
|
||||
36376461373631636630303861313538333834646461663539623738636636626537656438646431
|
||||
38383436393238363038313563633634396335346138626666366437333433383039363332623639
|
||||
31396165346431333838393164616339656634346561313737306562343562323030613266633263
|
||||
61333263653938653034356631333664323630306461346532626533363665363133376232316132
|
||||
61346431383230656134373630653264363430383561313866363235333435633966386266653964
|
||||
33363534343634343232373036633330613038303437333033313061313932373739343663303931
|
||||
34333833386638353436653831623835323032303134366635613735643662636336616464313330
|
||||
36633335613630663233326166633565386238656236633261396235363165656333333235643137
|
||||
32623461663562313533333835396233383330613661646431646365343430626662326638653330
|
||||
38646232386263356566373561353130616539346630613363313163363262356264653233313862
|
||||
34386331363236386534353534616531643264613764343362646366393435383332653664353363
|
||||
62333935363132373434613038353632643336633136656266316466373734646234636638316265
|
||||
62646261396465623561633964313065626361316630353965616233356565343834656563353830
|
||||
38346361336237646331366632633130613330336637326163663463386233643734356165666431
|
||||
61396263656237333138356231306437653337656133663031303031616437633564613733316264
|
||||
63633930353033636235653961393330326635626666626235336334653762373262633739356263
|
||||
32323532333463653937386430663437303238313130643435353739393639303033343865323736
|
||||
35366139643166626364373663333266376133636433653261316566366630396666336637326664
|
||||
30343039633133626435363364346666613732666335313865326234366136366130616334396338
|
||||
61663461623432303930623261336464643830303631396430363637383838616432356634303332
|
||||
61346536313035376139313638393737393136643366366364363862383335353533313534366534
|
||||
61356136366465373530393835613834366665653334376539303462336138646438653039306261
|
||||
36613736323566636634666331396463623439323063356232306631616135623231336439303739
|
||||
65393837653837336235396532323465656463636238643038383363616633383866333633663831
|
||||
61363634356634636265663837306232303362313564323463303363323931396438646337363161
|
||||
61313033343532336563393632373830326631616462616263346363636566663966396330386464
|
||||
62613039323065343838653439303333396536366537313335353834613338623961646235633764
|
||||
30333032323333663530613736313765343364363433366436666134623663653336386632333437
|
||||
64386639636237333138323431333234316432366236613530376234636438356531636630396431
|
||||
63643833366136363962346632616161363565336163313764383030303337346565613939383563
|
||||
65306137633965326534356666346238363137323233336561643333386265613863396338383134
|
||||
35363135303232376364306234323435356330333061613663326563343533636165356537336536
|
||||
61656131343966346365396133666662393930663237643134383963303766306534633034356335
|
||||
37633732393266633965616330643061616664336430643630633033326335643438373737653164
|
||||
34633737303533666335306466306330343233326531343065666138633166383664333130653864
|
||||
37623730333532633936316461333066313065316664383934343731616430366135346138663531
|
||||
33353134333934376663336366663036383630393031303731653332373335333131633136616537
|
||||
33666266373439346633373735643339653333626237623530346436306438396332613863346264
|
||||
30346431393735326566393633626535383538343866653262653330366330623930646631663961
|
||||
38656138313932623131613537376139666137653063313339666333313364343738306439656264
|
||||
32346533646465376135376531383132396337653966393133316436616563613135353863653064
|
||||
31373466616135393036333037623164346539323463333037613030386666396363353364396439
|
||||
39616536646638623739623834363662643566393430623632646434336162316362653434343337
|
||||
36623334303866343533623538663531303366343136636631376334653636313264376330313836
|
||||
66333131343062373138663330313633623166303337306466313362343034316364666666373965
|
||||
36373933343338646333373962623034353631623535306230346663373530346438386334303536
|
||||
62366666646263303764303330353835633163363666303133333730343263613039346162356532
|
||||
37323133613037313430366238313261633165643563666239623730653164666264633964626461
|
||||
31323536623335636333393338333166346336323132373466396432613133613933356232373532
|
||||
30653564323031636231343232646165653163393663663731313033323763663965356466366562
|
||||
33303830656238653164646161366265636566393436323135356630393033316337363361306363
|
||||
30393766636237336466353431616130653961326431323161313234333963643032393061303265
|
||||
33396664336535353164643462303636616265306338333634376664323837303238623638313266
|
||||
37643861343034646532626164353238373031633861623663316638333039643036353932323962
|
||||
39616136653639313232326362663834333363633562646563393561396464383765616230333230
|
||||
39663939326332333362
|
||||
62393230613162353938306335363361323162356461613234306332653236326632323038663738
|
||||
3832663036633166373961623738323162363532633638350a636565346534616431343862356534
|
||||
62306562623663623438623263636262303938303562343463333365613834623434623232303531
|
||||
6135343464616438360a383163343838323762626435346564313364376566356638623165363537
|
||||
65616337373633613530393361613561333939666131316366303761303964343762306462633038
|
||||
36303332336633653432613036346332663863376531623561343433383662623861633862363230
|
||||
65316536626365303764393839626364326539336637643631336439653761633730636562653066
|
||||
62353637633365336237663935383937633732363830623232376463326132353062336232363539
|
||||
64376632616631353138376263383162353866316366316562666538383538633038373535663033
|
||||
32663363383037666663373335306138623032343939313436656531616234303763396630663639
|
||||
66656538393538666166386635643563633465306662366436383936306233376361663331353630
|
||||
64333731396134646236653963356435656535613365353635383734346131383066356431663061
|
||||
37333533623439623164323738363035633664353831363162376331613965613635653663303339
|
||||
36623035633865633131363061346366643865636433303733613731643863333764313135616433
|
||||
30396636653734656631323562343330653839346461653037353439636135316134396533383731
|
||||
62303164366366616163656462346264383633353164333335613034363636373339613538376166
|
||||
38333238666334656632376465346538323938653661656130313232656137316463346430663134
|
||||
36636465356661666138616530326436326238383834336635663963363530316335613233396334
|
||||
36346634656331623039383266303437323239646563326161653831363833653338386533616231
|
||||
39613939393334353536613262643030323535396634363330396465303230646133356238373865
|
||||
62316630303366643965363835336563393838373933393435616532636338376265303830376162
|
||||
64653931343464656532373831666663326532373631376265636338323430396666383736636438
|
||||
37346535373761663338653035653738396430316261326333313532653638393535386139376266
|
||||
32333037303831653364336130646462616537383035633338653435633938303638633364336635
|
||||
33343963666162356534656635316261353930336431323539393066333930323236396566356330
|
||||
62333162353965616465396365616630313363636135633835353939633662363664343266373562
|
||||
36636666343765653530653435316466356139323236356638383230623730643637613633633565
|
||||
32353234656233353734653233323563313764613333653331333232653730396635633438633362
|
||||
34306337653732646236346361663937616332353765613131393339393766313131633561376430
|
||||
62386662393864303865303438616637303363646462313634383431373736643230653665636165
|
||||
39636638656534363862633134663962383138656637386462356261336465386431343036646233
|
||||
64666166346334333862653035303461626235633830623639643166373238373136343061303837
|
||||
39633133653761646231653639653262366334373963343236363233373635306638653865653730
|
||||
34616230343637616232313639333136313231393133346532353761623038656531376337333339
|
||||
63316364386162616438303263653936643135316661633266613033366232383232356331336133
|
||||
35313836363361363637383637643831313238613136396637386136633061666430313963633933
|
||||
37343663666130326139643663313534313835643162363566396430363831343965613363366161
|
||||
30353165313932623536393734306461616662663763333031623738383437643862623632656161
|
||||
31323432633962613366306435626339663638633931323161373331353635306536623836376432
|
||||
37373033306530623162316430613933366331303766386538396666346464363662646639643634
|
||||
31373064646630343035326336376464663231343239643137353731303761643037313561313039
|
||||
32613631353862376230316130333936376565373961383838383932396363396533316530383830
|
||||
37386139396637613131366161376431323565643434333531656330643331653734393038303336
|
||||
31366538663231623937653730326264633531623333363932656138396637303932333662383935
|
||||
39323437396361613038376335353732333839383965313262643165363635386231666634653665
|
||||
63333034663735623438393063333064363133396537646433383861613337313631633634343063
|
||||
34303065343965343633653331393131613334356162323466656164343730323032396134303763
|
||||
63393835646361316530643932613531326235313961663937653264656535623932303038616662
|
||||
39336136346361636132303434373461333466333833313139346531303837306238613664613731
|
||||
33363766393862663336383930326638346132326138623537656263366262353637626436313736
|
||||
32643837303761336230353037663235323265313939323436323736366565663533626365376361
|
||||
62633730373864386438653137326136373866363164616633636137356133643330623035323838
|
||||
33326137393937383833346537633361383966313230636133363663373638373864393838636161
|
||||
64386631366530653063656634336537396330633763336235393538356139323565336134326337
|
||||
61633330333164643166373064623032356135623336393262386461646535326462393638373866
|
||||
37626266393962393564306530336462323137386434626363383365366238636235356432323533
|
||||
65343262666162643932393061363531346464393363623037366639376536386234646135646330
|
||||
36623837356637353132643435633632356266323830653866393636316130306538336334376234
|
||||
36303265363037306436346666376337653837373839313732386131306535666639653733353737
|
||||
66353531623431663532623865373931656233333234356532363730643234633963653435356237
|
||||
61633134333536616235626666333738613637366264613961333663336330653132313234653132
|
||||
39383336623736333634633863356366383430306465373932366534626131343236336439343663
|
||||
38643133626566366163653164356436313661626432653435616630336563386466383939613038
|
||||
30336433663563343532663032633161363535643962646161396531646130343431663863633736
|
||||
33656437363432623135313163323064353863303164656661633161616536313165383939663935
|
||||
65393164363533663934643034316332643137643861333233303062333138633337323330323865
|
||||
63633538626537363739623132336466393835316565633936616562656466316363623432303231
|
||||
37383465393034346130616632616539653735323730633035333138373632313662373566373265
|
||||
63623761323763616634343966386233306435633965633764363133306531363739613039386231
|
||||
39376432656662653165373162623565393964396538653065343164663233313465363537663963
|
||||
35326461313761363734306664623265663335333661633732626233323332383335613437633936
|
||||
66383031363332353937303165643864666236356133643861373032613366333837356434613437
|
||||
63346637316465306330306135343338623238363139633939653730323961353630353365323938
|
||||
30373165336337303434316336363737623439306633306363383433383666653661613030393466
|
||||
35323762616664393838396365636334626130663839666438633361356164663562303930623664
|
||||
39653235646230363031613061383563663761636131623064633265363737633433623130316234
|
||||
32643836393530373535353732373730303932313131653465353432353065326566633965656531
|
||||
64323462616638646234636662346532663964366538653934646538303237366531613939666338
|
||||
64643666626338333036363234663664326439306432353833633637373439616661666434313831
|
||||
34383334386538656564653862333565623165316439666235376535396232336263663033396532
|
||||
31393866636661303934306536343065366265376131326238616338336161646139393464346534
|
||||
34643664646535316133636236356430316434613762313738623066653336616339383366653934
|
||||
32663930333366623032663838656632643532303136663664303035346237616630653262346461
|
||||
33343066346233313534323831646139636263306132666563333963633664323463333262316664
|
||||
65636635333562636333303964666164393533653033336539663162333764376362373165613734
|
||||
6366393631666464616334646262316161363136646334356133
|
||||
|
|
|
@ -30,3 +30,8 @@ drone_secrets:
|
|||
restic_secrets:
|
||||
user_secret: xxx
|
||||
encryption_secret: xxx
|
||||
|
||||
mailman_secrets:
|
||||
postgres_password: xxx
|
||||
hyperkitty_api_key: xxx
|
||||
django_secret_key: xxx
|
||||
|
|
|
@ -76,13 +76,22 @@ drone:
|
|||
domain: "drone.{{ base_domain }}"
|
||||
volume_folder: "{{ volume_root_folder }}/drone"
|
||||
|
||||
mail_subnet_base: "192.168.203"
|
||||
|
||||
mailu:
|
||||
version: 1.6
|
||||
domain: "mail.{{ base_domain }}"
|
||||
dns: 192.168.203.254
|
||||
subnet: 192.168.203.0/24
|
||||
dns: "{{ mail_subnet_base }}.254"
|
||||
subnet: "{{ mail_subnet_base }}.0/24"
|
||||
volume_folder: "{{ volume_root_folder }}/mailu"
|
||||
|
||||
mailman:
|
||||
domain: "lists.{{ base_domain }}"
|
||||
volume_folder: "{{ volume_root_folder }}/mailman"
|
||||
core_ip: "{{ mail_subnet_base }}.12"
|
||||
web_ip: "{{ mail_subnet_base }}.13"
|
||||
database_ip: "{{ mail_subnet_base }}.14"
|
||||
|
||||
portainer:
|
||||
domain: "portainer.{{ base_domain }}"
|
||||
volume_folder: "{{ volume_root_folder }}/portainer"
|
||||
|
|
10
roles/docker/files/mailman/mailman-extra.cfg
Normal file
10
roles/docker/files/mailman/mailman-extra.cfg
Normal file
|
@ -0,0 +1,10 @@
|
|||
[mta]
|
||||
incoming: mailman.mta.postfix.LMTP
|
||||
outgoing: mailman.mta.deliver.deliver
|
||||
# mailman-core hostname or IP from the Postfix server
|
||||
lmtp_host: localhost
|
||||
lmtp_port: 8024
|
||||
# Postfix server's hostname or IP from mailman-core
|
||||
smtp_host: smtp
|
||||
smtp_port: 25
|
||||
configuration: /etc/postfix-mailman.cfg
|
11
roles/docker/files/mailman/postfix.cf
Normal file
11
roles/docker/files/mailman/postfix.cf
Normal file
|
@ -0,0 +1,11 @@
|
|||
append_at_myorigin=no
|
||||
append_dot_mydomain=no
|
||||
recipient_delimiter = +
|
||||
unknown_local_recipient_reject_code = 550
|
||||
owner_request_special = no
|
||||
virtual_mailbox_maps = regexp:/opt/mailman-core-data/postfix_lmtp \$virtual_alias_maps
|
||||
transport_maps = regexp:/opt/mailman-core-data/postfix_lmtp
|
||||
local_recipient_maps = regexp:/opt/mailman-core-data/postfix_lmtp
|
||||
relay_domains = regexp:/opt/mailman-core-data/postfix_domains
|
||||
always_add_missing_headers = yes
|
||||
local_header_rewrite_clients = permit_sasl_authenticated
|
97
roles/docker/tasks/services/mailman.yml
Normal file
97
roles/docker/tasks/services/mailman.yml
Normal file
|
@ -0,0 +1,97 @@
|
|||
---
|
||||
|
||||
- name: copy nginx configuration to link static files
|
||||
template:
|
||||
src: "templates/mailman/nginx_vhost"
|
||||
dest: "{{ nginx.volume_folder }}/vhost/lists.data.coop"
|
||||
mode: "0644"
|
||||
|
||||
- name: run mailman server containers
|
||||
docker_compose:
|
||||
project_name: "mailman"
|
||||
definition:
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
|
||||
mailman-core:
|
||||
image: maxking/mailman-core:0.3.11
|
||||
volumes:
|
||||
- "{{ volume_root_folder }}/mailman/core:/opt/mailman"
|
||||
stop_grace_period: 30s
|
||||
links:
|
||||
- mailman-web:mailmain-web
|
||||
- database:database
|
||||
depends_on:
|
||||
- database
|
||||
environment:
|
||||
DATABASE_URL: "postgres://mailman:{{ mailman_secrets.postgres_password }}@172.19.199.4/mailmandb"
|
||||
DATABASE_TYPE: "postgres"
|
||||
DATABASE_CLASS: "mailman.database.postgresql.PostgreSQLDatabase"
|
||||
HYPERKITTY_API_KEY: "{{ mailman_secrets.hyperkitty_api_key }}"
|
||||
HYPERKITTY_URL: http://172.19.199.3:8000/hyperkitty
|
||||
MTA: "postfix"
|
||||
SMTP_HOST: "{{ smtp_host }}"
|
||||
SMTP_PORT: "{{ smtp_port }}"
|
||||
SMTP_HOST_USER: "noop"
|
||||
MM_HOSTNAME: "172.19.199.2"
|
||||
networks:
|
||||
mailman:
|
||||
ipv4_address: 172.19.199.2
|
||||
postfix:
|
||||
external_services:
|
||||
|
||||
mailman-web:
|
||||
image: maxking/mailman-web:0.3.11
|
||||
depends_on:
|
||||
- database
|
||||
links:
|
||||
- database:database
|
||||
volumes:
|
||||
- "{{ volume_root_folder }}/mailman/web:/opt/mailman-web-data"
|
||||
environment:
|
||||
DATABASE_TYPE: "postgres"
|
||||
DATABASE_URL: "postgres://mailman:{{ mailman_secrets.postgres_password }}@172.19.199.4/mailmandb"
|
||||
HYPERKITTY_API_KEY: "{{ mailman_secrets.hyperkitty_api_key }}"
|
||||
DJANGO_ALLOWED_HOSTS: "lists.data.coop"
|
||||
SERVE_FROM_DOMAIN: "lists.data.coop"
|
||||
MAILMAN_ADMIN_USER: "valberg"
|
||||
MAILMAN_ADMIN_EMAIL: "valberg@orn.li"
|
||||
MAILMAN_REST_URL: "http://172.19.199.2:8001"
|
||||
SECRET_KEY: "{{ mailman_secrets.django_secret_key }}"
|
||||
SMTP_HOST: "{{ smtp_host }}"
|
||||
SMTP_PORT: "{{ smtp_port }}"
|
||||
VIRTUAL_HOST: "lists.data.coop"
|
||||
VIRTUAL_PORT: 8000
|
||||
LETSENCRYPT_HOST: "lists.data.coop"
|
||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||
networks:
|
||||
mailman:
|
||||
ipv4_address: 172.19.199.3
|
||||
postfix:
|
||||
external_services:
|
||||
|
||||
database:
|
||||
image: postgres:13
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_DB: mailmandb
|
||||
POSTGRES_USER: mailman
|
||||
POSTGRES_PASSWORD: "{{ mailman_secrets.postgres_password }}"
|
||||
volumes:
|
||||
- "{{ volume_root_folder }}/mailman/database:/var/lib/postgresql/data"
|
||||
networks:
|
||||
mailman:
|
||||
ipv4_address: 172.19.199.4
|
||||
|
||||
networks:
|
||||
mailman:
|
||||
driver: bridge
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.19.199.0/24
|
||||
postfix:
|
||||
external: true
|
||||
external_services:
|
||||
external: true
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
|
||||
- name: create mailu volume folders
|
||||
- name: "[Mailu] create mailu volume folders"
|
||||
file:
|
||||
name: "{{ mailu.volume_folder }}/{{ volume }}"
|
||||
state: directory
|
||||
|
@ -17,12 +17,12 @@
|
|||
loop_control:
|
||||
loop_var: volume
|
||||
|
||||
- name: upload mailu.env file
|
||||
- name: "[Mailu] upload mailu.env file"
|
||||
template:
|
||||
src: mailu.env.j2
|
||||
dest: "{{ mailu.volume_folder}}/mailu.env"
|
||||
|
||||
- name: hard link to Let's Encrypt TLS certificate
|
||||
- name: "[Mailu] hard link to Let's Encrypt TLS certificate"
|
||||
file:
|
||||
src: "{{ nginx.volume_folder }}/certs/{{ mailu.domain }}/fullchain.pem"
|
||||
dest: "{{ mailu.volume_folder }}/certs/cert.pem"
|
||||
|
@ -30,20 +30,40 @@
|
|||
force: yes
|
||||
|
||||
|
||||
- name: hard link to Let's Encrypt TLS key
|
||||
- name: "[Mailu] hard link to Let's Encrypt TLS key"
|
||||
file:
|
||||
src: "{{ nginx.volume_folder }}/certs/{{ mailu.domain }}/key.pem"
|
||||
dest: "{{ mailu.volume_folder }}/certs/key.pem"
|
||||
state: hard
|
||||
force: yes
|
||||
|
||||
- name: run mail server containers
|
||||
- name: "[Mailman] copy nginx configuration to link static files"
|
||||
template:
|
||||
src: mailman/nginx_vhost.j2
|
||||
dest: "{{ nginx.volume_folder }}/vhost/{{ mailman.domain }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: "[Mailman] copy postfix override"
|
||||
copy:
|
||||
src: mailman/postfix.cf
|
||||
dest: "{{ mailu.volume_folder }}/overrides/postfix.cf"
|
||||
mode: "0644"
|
||||
|
||||
- name: "[Mailman] copy mailman config"
|
||||
copy:
|
||||
src: mailman/mailman-extra.cfg
|
||||
dest: "{{ mailman.volume_folder }}/core/mailman-extra.cfg"
|
||||
mode: "0644"
|
||||
|
||||
- name: Start containers
|
||||
docker_compose:
|
||||
project_name: mail_server
|
||||
pull: yes
|
||||
definition:
|
||||
version: '3.6'
|
||||
services:
|
||||
|
||||
### Mailu containers ###
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: always
|
||||
|
@ -117,6 +137,7 @@
|
|||
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
||||
volumes:
|
||||
- "{{ mailu.volume_folder }}/overrides:/overrides"
|
||||
- "{{ mailman.volume_folder }}/core/var/data:/opt/mailman-core-data/"
|
||||
depends_on:
|
||||
- front
|
||||
- resolver
|
||||
|
@ -149,6 +170,73 @@
|
|||
dns:
|
||||
- "{{ mailu.dns }}"
|
||||
|
||||
### Mailman containers ###
|
||||
mailman-core:
|
||||
image: maxking/mailman-core:0.3.11
|
||||
volumes:
|
||||
- "{{ mailman.volume_folder }}/core:/opt/mailman"
|
||||
stop_grace_period: 30s
|
||||
links:
|
||||
- mailman-web:mailmain-web
|
||||
- database:database
|
||||
depends_on:
|
||||
- database
|
||||
environment:
|
||||
DATABASE_URL: "postgres://mailman:{{ mailman_secrets.postgres_password }}@{{ mailman.database_ip }}/mailmandb"
|
||||
DATABASE_TYPE: "postgres"
|
||||
DATABASE_CLASS: "mailman.database.postgresql.PostgreSQLDatabase"
|
||||
HYPERKITTY_API_KEY: "{{ mailman_secrets.hyperkitty_api_key }}"
|
||||
HYPERKITTY_URL: "http://{{ mailman.web_ip }}:8000/hyperkitty"
|
||||
MTA: "postfix"
|
||||
SMTP_HOST: smtp
|
||||
MM_HOSTNAME: "{{ mailman.core_ip }}"
|
||||
networks:
|
||||
default:
|
||||
ipv4_address: "{{ mailman.core_ip }}"
|
||||
external_services:
|
||||
|
||||
mailman-web:
|
||||
image: maxking/mailman-web:0.3.11
|
||||
depends_on:
|
||||
- database
|
||||
links:
|
||||
- database:database
|
||||
volumes:
|
||||
- "{{ mailman.volume_folder }}/web:/opt/mailman-web-data"
|
||||
environment:
|
||||
DATABASE_TYPE: "postgres"
|
||||
DATABASE_URL: "postgres://mailman:{{ mailman_secrets.postgres_password }}@{{ mailman.database_ip }}/mailmandb"
|
||||
HYPERKITTY_API_KEY: "{{ mailman_secrets.hyperkitty_api_key }}"
|
||||
DJANGO_ALLOWED_HOSTS: "{{ mailman.domain }}"
|
||||
SERVE_FROM_DOMAIN: "{{ mailman.domain }}"
|
||||
MAILMAN_ADMIN_USER: "valberg"
|
||||
MAILMAN_ADMIN_EMAIL: "valberg@orn.li"
|
||||
MAILMAN_REST_URL: "http://{{ mailman.core_ip }}:8001"
|
||||
MAILMAN_HOST_IP: "{{ mailman.core_ip }}"
|
||||
SECRET_KEY: "{{ mailman_secrets.django_secret_key }}"
|
||||
SMTP_HOST: smtp
|
||||
VIRTUAL_HOST: "{{ mailman.domain }}"
|
||||
VIRTUAL_PORT: 8000
|
||||
LETSENCRYPT_HOST: "{{ mailman.domain }}"
|
||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||
networks:
|
||||
default:
|
||||
ipv4_address: "{{ mailman.web_ip }}"
|
||||
external_services:
|
||||
|
||||
mailman-database:
|
||||
image: postgres:13
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_DB: mailmandb
|
||||
POSTGRES_USER: mailman
|
||||
POSTGRES_PASSWORD: "{{ mailman_secrets.postgres_password }}"
|
||||
volumes:
|
||||
- "{{ mailman.volume_folder }}/database:/var/lib/postgresql/data"
|
||||
networks:
|
||||
default:
|
||||
ipv4_address: "{{ mailman.database_ip }}"
|
||||
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
- "{{ nginx.volume_folder }}/html:/usr/share/nginx/html"
|
||||
- "{{ nginx.volume_folder }}/dhparam:/etc/nginx/dhparam"
|
||||
- "{{ nginx.volume_folder }}/certs:/etc/nginx/certs:ro"
|
||||
- "{{ volume_root_folder }}:/docker-volumes/:ro"
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
|
||||
- name: nginx letsencrypt container
|
||||
|
|
|
@ -8,6 +8,17 @@
|
|||
gateway: 172.16.0.1
|
||||
|
||||
- name: setup postfix docker container for outgoing mail
|
||||
vars:
|
||||
mynetworks:
|
||||
- 127.0.0.0/8
|
||||
- 10.0.0.0/8
|
||||
- 172.16.0.0/12
|
||||
- 192.168.0.0/16
|
||||
- 172.19.199.2
|
||||
- 172.19.199.3
|
||||
allowed_sender_domains:
|
||||
- "{{ base_domain }}"
|
||||
- "lists.data.coop"
|
||||
docker_container:
|
||||
name: postfix
|
||||
image: boky/postfix
|
||||
|
@ -15,5 +26,5 @@
|
|||
networks:
|
||||
- name: postfix
|
||||
env:
|
||||
ALLOWED_SENDER_DOMAINS: "{{ base_domain }}"
|
||||
|
||||
ALLOWED_SENDER_DOMAINS: "{{ allowed_sender_domains|join(' ') }}"
|
||||
MYNETWORKS: "{{ mynetworks|join(',') }}"
|
||||
|
|
3
roles/docker/templates/mailman/nginx_vhost.j2
Normal file
3
roles/docker/templates/mailman/nginx_vhost.j2
Normal file
|
@ -0,0 +1,3 @@
|
|||
location /static/ {
|
||||
alias {{ volume_root_folder }}/mailman/web/static/;
|
||||
}
|
Loading…
Reference in a new issue