Mailu service #21

Merged
valberg merged 6 commits from service/mailu into master 2019-03-05 12:14:03 +00:00
11 changed files with 168 additions and 91 deletions
Showing only changes of commit f734e7608b - Show all commits

View file

@ -1,51 +1,54 @@
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
64346663666535326565323563373636363265386662643039373566303933353265623934336662 62313439613039363637356330653731356138373839373435306535656137646266633764393537
3463623661616637636239323033386164383465373935340a653538333938626665366330636235 3737663637343865303232643632613934313137613536640a633634356338353764366365626266
32343439343561393234616164393835636566343234363963653938363832383363393030343638 66323064346539663435646265346665616465353363623732303563303838356364643734393231
6266373436343637390a336133633139363065613332353563653261323763323733613135663465 3161633362383363390a376530393463643838303238386139313661366335386439373734333835
61366663313266656366663439343235306130356261633930316337653733396533643835643165 63323034303732386430313265306465636630356330303431663761363461623530643933393831
63353564353338643362616132626632336232386162363236363637386333623839323633323763 62666438316266396432353663633331343137643265333966636436373730343938623732653030
34343762386235633631623730636361336135353132393961643634393963636236313233363236 62383536373139366239363535353463643961313839376436663830613738303262646639396131
30343662346165313132363730616461306638663137643538363463323932626436303864643738 66656532616231636537623162373965356537336436613130366464393461343730646664356466
66643761616133623138396461633833353330336332336365306134333165333432653863393531 38313439373332306265643039666532363863333364666233333861363832316637383432343464
35346266336236333133646164666133383736636537346261356331376131393233313434323934 64366536613364363265333938643438313837643936323536636335613064623639393437303466
66336130323162333239636366313034653135653832306666313766653664336639646436343066 31333539373130376230323964636335393166306662626131636462656632623635393036663437
37383833623936626330316337653465623762633639303163356338656638626364613436323564 37333735616665383431623266393365613433323335313161316161373637616563626637333861
31316136323232396534653062313966353539356564633835363631633461383437623134386636 37326532303638653139383639383166323361363334306361663261366661613038633464323337
32353933653630373363393063373865353663393234343065326435633931386534643934643237 31393538653830333865373064383837626261663163623664653938303230616334363861346132
65356435303834303930356333353336653961373131323336613634333935303939343632666333 63353036313164313265313134633861633937323335303830336232363939613635303764313063
62636564353036343933666331326630376236653563303031643331303336383461616638316236 33666161356366636139633138653736333662303364333838663033633163613136616639376532
31353663336561613063303235303231656462313032656234616165366534303632383631303463 31373131326264383666326566303930636166653463313630376235663638663937663765306439
64303530636434386235386333333636303865633061383434653433386437313634323834636635 31663039323663633735326266393263633937373339383537623835306431333636316664303864
39653131633061376661643761663264353864323931333031323033396666646130616361333566 63653564313339376135303237626366666164623738626439613562616338663539393635396437
61633436666461623262383336643032653463396230333466383239356530333538633533346161 30333036353035613131613034666262346233336563343531633033343163326264326563643235
61373266306535393430636339653834383664633839656238636232353134633336323430623334 62663538623532333432656435306462663362353630346133373262633630306262626362653733
33636334376163653665653039333564373237366261623038653337366334663831346663646165 65363031346339393632396664363362346236373035376632663466343034376566666563353231
62613936326362363063643866663534363435646533333938333265633863666538663132633233 36623538303262323265616237326630666662646634383962656533636165326665316366643231
63623236303162326163666435316136323932393836626435336466333566616438343663643933 39303465313135616238653664366637356361393165356430636137366236643938316430613838
34623665306135373232386137356638373362326461396439323134396236623933663635396135 65353331636564373136393930303537386335653766363632646433353962613033656434313063
30653661663039306236653861643932633938356665313665613261363335636338356364346263 35653365366332316434373665316230646665613166656230313832356136346439326232343166
33643466333366633965353039646362313333356636323364336165616339393565386236613132 38323934396561386138323739396166303132396234386435633965663139643234396434333163
34643332366338323765346333633065613638363365636634316564616136363431333964623231 66346634393330306638383430616433333361623861623864356563366162313830393334616138
33373462373365663665386638633932363662383036613038393139633035313230396437373834 32346633396662636633373637363262656165316434333139346530303562356236306637643365
32383763623364386436373031306136343963646133626263393266383139616662633461666263 65613361373637383936633431396636356634656333343537353762383537353035616131633732
62646538326561313266656463303631613336376162363731616530383264343832383236373564 38303736636136393039613537613831633139363338656239613261383637653332333737323034
39626530303337386531333965376333383364396464353262646531326535336561356365343135 61303839636330396139346436336663643531613364383134613061646136646236636364636662
39353831653865306464623435623335376437333964663936386432376166343132646266393361 33666564623731343264306638303333326463323363306439333762306434306235643530663931
64393838376464626363643335636439373765336637303562333437393239613534383232313833 63623932373737373539393230326538643739653734306131366365303638313263316635633439
35636365303130373533663838396132386538386566326637366531666438373036323038643765 34343231663761393266636537353330643361306139653734383466666662623931616665663239
32653761623735306130393366636238623534323937613131303665386533623030333036356361 65633136636333316266616433396166326333303033646162656466363931313539343035623666
37326563616632346166366633383661633565346433366361373735663161633833626665366438 63346162386533373334633261383237376330643738663761636166653033303933613630653835
61333035316339626262303264333139346263323762663731613832623663393831313431623265 66313439663732356539363833616338356337666335316136623231383161656362653561653565
37666137303463623263363261303662303063353235306665613732393935346665386161643664 33616437643533386263393733636666373237663132343432636664633535653535316134313266
31333831373761376530653239646139323564366666663662316362643265333365386632643164 66363362383662313632633535613635656364323939313466303634646237653061353766373831
65376466663036656130633337376261343032366634343665363134323639616661613935353934 62303366366564653231613863633564303637346262336535386366663034663832663762666132
33613139363233616433633133656633383535383435343438303464393063336665623632333866 64333630666463653266333430386135386436643939393964303230366538336562333737616639
63393530623536323930316134363164653063333530353732323637646364643164643339343832 65646566663363313430396132653832646263393739656564653138353637373362613261366230
66646233366239613833646430356635613231386338346464343964313062396166346338636438 62616561303735316230626134353266613938326563326232623361656364623062326365343534
39643231623262303133333961636362653365326264326362616532303539326231303465363964 62346433373965336430326632333634306463343934393830393165393933323439393534386665
61373730396439626132643766306532613462393065656332666133333536326537333161303961 32373235353037626638343066386563663431356465353039353338643835653166333761386433
37353939343565363165646362316633366662373237346431373665316430323332663033333133 64333338306661346436373238646134653233666565653834303935303235653661343366653563
34333165383138366438636435343636616265663730356564613866336130633732363930306334 63356566633730303033376230356363326561663232386161333566616334623236663562613234
38393265656134663964333366306363663439666639623439393565326564366461366362393033 63646561623565366332313837353461313566653531356662613663323065613035323731323832
3731616562313735396236313131333838623532393266376638 31386166623935373139356239353037633363313531396466363735613332653430396161303366
37376238333831306231393433313734303839376132656532616461356662383430303532373937
39303634303762373736626439323830353665343162363531376134616466303762633535343866
3162

View file

@ -19,6 +19,9 @@
- matrix_riot - matrix_riot
- privatebin - privatebin
- codimd - codimd
- netdata
- docker_registry
- websites
smtp_host: postfix smtp_host: postfix
smtp_port: 587 smtp_port: 587
@ -27,4 +30,4 @@
- import_role: - import_role:
name: ubuntu_base name: ubuntu_base
- import_role: - import_role:
name: docker name: docker

View file

@ -12,6 +12,7 @@ nextcloud:
gitea: gitea:
domain: "git.{{ base_domain }}" domain: "git.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/gitea"
passit: passit:
domain: "passit.{{ base_domain }}" domain: "passit.{{ base_domain }}"
@ -31,4 +32,19 @@ privatebin:
codimd: codimd:
domain: "pad.{{ base_domain }}" domain: "pad.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/codimd" volume_folder: "{{ volume_root_folder }}/codimd"
netdata:
domain: "netdata.{{ base_domain }}"
docker_registry:
domain: "docker.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/docker-registry"
username: "docker"
password: "{{ docker_password }}"
data_coop_website:
domain: "{{ base_domain }}"
cryptohagen_website:
domain: "cryptohagen.dk"

View file

@ -0,0 +1 @@
client_max_body_size 10G;

View file

@ -43,9 +43,9 @@
env: env:
CMD_DB_URL: "postgres://codimd:{{ postgres_passwords.codimd }}@codimd_db:5432/codimd" CMD_DB_URL: "postgres://codimd:{{ postgres_passwords.codimd }}@codimd_db:5432/codimd"
CMD_ALLOW_EMAIL_REGISTER: False CMD_ALLOW_EMAIL_REGISTER: "False"
CMD_IMAGE_UPLOAD_TYPE: "filesystem" CMD_IMAGE_UPLOAD_TYPE: "filesystem"
CMD_EMAIL: False CMD_EMAIL: "False"
CMD_LDAP_URL: "ldap://openldap" CMD_LDAP_URL: "ldap://openldap"
CMD_LDAP_BINDDN: "cn=admin,dc=data,dc=coop" CMD_LDAP_BINDDN: "cn=admin,dc=data,dc=coop"
CMD_LDAP_BINDCREDENTIALS: "{{ ldap_admin_password }}" CMD_LDAP_BINDCREDENTIALS: "{{ ldap_admin_password }}"

View file

@ -0,0 +1,35 @@
---
- name: copy docker registry nginx configuration
copy:
src: "files/configs/docker_registry/nginx.conf"
dest: "/docker-volumes/nginx/vhost/{{ docker_registry.domain }}"
mode: "0644"
- name: docker registry container
docker_container:
name: registry
image: registry:2
restart_policy: always
volumes:
- "{{ docker_registry.volume_folder }}/registry:/var/lib/registry"
- "{{ docker_registry.volume_folder }}/auth:/auth"
networks:
- name: external_services
env:
VIRTUAL_HOST: "{{ docker_registry.domain }}"
LETSENCRYPT_HOST: "{{ docker_registry.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
REGISTRY_AUTH: "htpasswd"
REGISTRY_AUTH_HTPASSWD_PATH: "/auth/htpasswd"
REGISTRY_AUTH_HTPASSWD_REALM: "data.coop docker registry"
- name: generate htpasswd file
shell: "docker exec -it registry htpasswd -Bbn docker {{ docker_password }} > {{ docker_registry.volume_folder }}/auth/htpasswd"
args:
creates: "{{ docker_registry.volume_folder }}/auth/htpasswd"
- name: log in to local registry
docker_login:
registry: "{{ docker_registry.domain }}"
username: "docker"
password: "{{ docker_password }}"

View file

@ -32,8 +32,8 @@
- name: external_services - name: external_services
- name: postfix - name: postfix
env: env:
GO_ENV: production GO_ENV: "production"
DATABASE_URL: postgres://fider:{{ postgres_passwords.fider }}@fider_db:5432/fider?sslmode=disable DATABASE_URL: "postgres://fider:{{ postgres_passwords.fider }}@fider_db:5432/fider?sslmode=disable"
JWT_SECRET: "{{ fider_jwt_secret }}" JWT_SECRET: "{{ fider_jwt_secret }}"
EMAIL_NOREPLY: noreply@{{ fider.domain }} EMAIL_NOREPLY: noreply@{{ fider.domain }}

View file

@ -1,49 +1,19 @@
--- ---
# old DNS: 138.68.71.153
- name: gitea network
docker_network:
name: gitea
- name: gitea app volume
docker_volume:
name: gitea
- name: gitea database volume
docker_volume:
name: gitea_db
- name: gitea database container
docker_container:
name: gitea_db
image: postgres:10
state: started
restart_policy: always
networks:
- name: gitea
volumes:
- gitea_db:/var/lib/postgresql/data
env:
POSTGRES_DB: somethingelse
POSTGRES_USER: gitea
POSTGRES_PASSWORD: "{{ postgres_passwords.gitea }}"
- name: gitea container - name: gitea container
docker_container: docker_container:
name: gitea name: gitea
image: gitea/gitea:latest image: gitea/gitea:latest
restart_policy: always restart_policy: unless-stopped
networks: networks:
- name: gitea - name: gitea
- name: external_services - name: external_services
volumes: volumes:
- gitea:/data - "{{ gitea.volume_folder }}:/data"
published_ports: published_ports:
- "222:22" - "22:22"
env: env:
VIRTUAL_HOST: "{{ gitea.domain }}" VIRTUAL_HOST: "{{ gitea.domain }}"
VIRTUAL_PORT: "3000"
LETSENCRYPT_HOST: "{{ gitea.domain }}" LETSENCRYPT_HOST: "{{ gitea.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
POSTGRES_HOST: gitea_db
POSTGRES_DB: gitea
POSTGRES_USER: gitea
POSTGRES_PASSWORD: "{{ postgres_passwords.gitea }}"

View file

@ -0,0 +1,24 @@
---
- name: setup netdata docker container for system monitoring
docker_container:
name: netdata
image: netdata/netdata
hostname: "hevonen.servers.{{ base_domain }}"
capabilities:
- SYS_PTRACE
security_opts:
- apparmor:unconfined
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- name: external_services
env:
VIRTUAL_HOST : "{{ netdata.domain }}"
LETSENCRYPT_HOST: "{{ netdata.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
PGID: "999"

View file

@ -0,0 +1,23 @@
---
- name: setup data.coop website docker container
docker_container:
name: website
image: docker.data.coop/data-coop-website
networks:
- name: external_services
env:
VIRTUAL_HOST : "{{ data_coop_website.domain }}"
LETSENCRYPT_HOST: "{{ data_coop_website.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
- name: setup cryptohagen.dk website docker container
docker_container:
name: website
image: docker.data.coop/cryptohagen-website
networks:
- name: external_services
env:
VIRTUAL_HOST : "{{ cryptohagen_website.domain }}"
LETSENCRYPT_HOST: "{{ cryptohagen_website.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"

View file

@ -6,3 +6,5 @@
packages: packages:
- aptitude - aptitude
- python3-pip - python3-pip
- apparmor