Fuck with ansible layout.

1. Fuck around with Goof configuration. I think ultimately this never
went anywhere, and I'll probably rip it out, but I forgot to commit it
at the time so i'm including it just to be safe.

2. Home services and home net refactor. Smaller clean ups

3. Removal of wg stuff.
master
josiah 9 months ago
parent cf8b48f3d4
commit 7b38b89acb

@ -1,139 +1,162 @@
$ANSIBLE_VAULT;1.1;AES256
62396437313531356132303439343466326435326631633633653464313331323962653536663737
3162663062366633336137323165653531313837666331380a326534356132623064343130626239
62396535653066306533666630643836393335326661636531313231386163616263633031643337
3966623265623735630a313334346434376630636236663336623663333562613633633331633637
38363738356135303730653634333335626133656333323866303233313631663236386661356134
39616666633061316231346238383931663538343532643039653965616632663934633830616238
32363430623966346561316330396632383434656364656165646530666663663839336363383332
37653935616133636661363831353435666564306161663163356637303634663138663066353766
66303865356531653436353633613661366134376439363565346466306461393138633761393733
65613462326635656632353931393365376434323130376432363032306661363335376634303838
63666363366531623066643261333834373731383062346662616561333632636264313931336262
30333733346163383635643430656366333333353961346261666239663233626663376239373337
33626437313839373131613032313537346436646438336666383163633363613561653563656261
37313136656665656663353062656664303466343737306537363933316535373035333065653264
38386437643236613435366361613838666432646363313263383562326231633164633933316438
38646630313937356430393263336233376339623235653532636432616336376636306632636662
37343066336265363966653431666637623936376338373334343362323062633234323438636135
65643562363735356332383736356439346230323530646133623763633237323166333333336264
34356331383437623334323239353764366466373566653330626234653135356663336365326131
33396135303963346465343934393638616232646636393030326630346233373735366138313438
38393839613631626561633863393831326234323034636162623335626535616664663362663538
35383333303338653361383664653261326534636436666231653465353739373034636338356333
35306166633831363236343731313532623865353431343538636137666335383661343363393234
32316135633062316265383963626331383335666466396633303165626166313531376533333765
36303761333961333462623464353633626331633933373962363566373562373164313839383862
36303030376664393832353964396232323861626334613363616132376163363533356566306638
39613537366332366665356231653239613630333233343437336532373136376236363030323462
37623038656539643439326264383531626336313361613165653731333063373662373934353564
34366162303732613232643166333530323634613864613235323234363231376561346362383933
35643639616430323464343663653861393664373064313761623135383363363737363235663537
35393937643636363264623432333231376362636634613666326236386263366663363765383235
36313430643330346565363639633064353365326533656436323636636462656433643039303165
32376539643064623336323461373733363863373638366531356564326139306563303230633933
61623665656432323965396431386664616535373235626564633831666538663133336366363536
35356432336139396262623163316333633738383064376337396237393139336166633834376537
38333830653336653034326635636232636239376165386136643766613532343432353735643330
64313731353031326162383565666432346665356534333537343637396666653731353565343839
33663832653062373765656262393433346330363134343862316332626331326133653063303239
36313835626230393034626566386634666534356133623635343038616666346439663138303137
63316363616565326531616135633038616232303138323465616435613661396363313766666639
30366364336438366166356536626333376664653132396635396232336634313432396332623630
31653563363930323764343733333130623236353262333231393462333366623334373338636635
62356664343238386166336665303766326266626531373838326266396362643533626138626434
32383062613965353762386262373233643436343033366331396634646130373135626334373931
38313761633634363633346465326330383766636563356334323831653665303535346236343530
38386635643631346262643064613031636262663436363832373839366236343536313232333730
31323064393332653330646362336264646262656330303131306632653165373564386463353234
66303239663934613764306232303063613138663934336662356231636339626366383938646565
34386433346666383966303265613335363062643166313938353365376136326138383438346238
65346434383063356130363533333662313335333534656333333236393031653063663761623330
64343732363131393266353762383061383665626661646464303438346535356564626164363563
65353663613036396434666664326332326264313535303733653033646335303865363765336237
35306635303033633439356433303339333538353531663136333234383134643535373865376366
64623065386365316437633338336537623630343335396239636562316239373535303466316362
62616239393337643466376163653135386261323062393965323632666461363238363830313565
65623738306134323336366261323764653632393038393334373161323338343238653063306238
64323961313165383431376337383565623738363830393062623933333735353730643764663337
61373439613166613839376261386563343834343837376464633965363865633436663965623865
31643461636162353631393563363731343765383430643935636232613132643065613739646238
34333138316134646238613335376630333735363330663063333534646263333533623065633365
30353838343839666635333165363239306130316636626563376532386539626133343930326637
34316666306363616336343165353666313439313664303661323830326564343830393334316139
33646163663166326137303538343433313131656662346561366530636534363661353234346365
63646531663631663632393663376131383636376231613936656436613938353535346666303863
35376565396631616131383139333361633763646262353137613334353831653731323262666661
36373131323766376134636237366538663962663535326132623132653761343439633230396135
65613039663332316530653632626666366635653331363731303133653332663230386431656566
63303930323631653838303833356366313834333765313733613736653137313761623438356638
37616265363737343437636164393132613064663432366166613635366366376661336435383661
33633432353561666230643230383532663335383062333935386465636663663538306533393361
63656665633463636635333661306330623836373337336533366466623437653938636139346630
32376465653832353863666463313163393637636563643161313336323432333564363531643136
38316162333636366535656565653766383566643561623766643533363032643336393532656530
33636639343430613739343638323339373733356130306366313733363066633237653034633731
65613262316363616163666661386337313066393261626335633866633430373833373138333533
34653435396237376337616631333932306333313162666561613835623938363737313238653031
36346237386139343339613063613630313839386166333434313430316466373639333232373335
61373366636532383832356536366233363936653666313434353233633739313032633830373736
33356230343935636338336666616466323234306638616432643562353635323537643533383037
38623735633963373937666465353164623838643734643937373130633230363334306561363035
63643432303539303038343262666634353632353239366137613133643832316361636333383632
33656133386565613938356330343762393035303966313836663238666162373664343939386230
62656330356634353730346633333539393036663032346433313563383334626532653631613430
62333532623365373932303434356532653131663236356136626263373337373036633333323462
39613462343034336436333833623630653962363461323964613531393261623135633163313138
38393661346633303861636366653464383630326132393033633630643735663838313435663364
37656335646439383237656431303830666133646332313732636331613938323362323932633131
63363234306263353137626533316337386437383139323964346337656664343932353561653634
35663639356631353138376263633330336437383163376238626530336534396564376262366666
33376336653434353065373735623736336262336433356336663936363639663033623136343837
32353566336264346661306565336466613066353666333334626262666538366638383566656238
62613264643630363861623131323738383130623062393632356239616237623433386263356435
65313733653836336435323962343261626661626636333338343864343531363461316635623334
36616265303037383732623234663936663835303435356266636132623165356136353037386639
64666262366630396332393330326166353530656262346230316238343233623561613535346338
37656266383536393462336536656236636239613962663533326639356363656338626362656231
64326566623639646330643837663932326535666232626239363666393438623564663931646162
65396432666137663633316230383635616162646230303465306538366633373239373836643161
64363832303231346431353937636463396633626162313966313262636562666537326334373433
65636139353466306438366132666566633830353939383737393361303061623136613962393263
36623565646561356335323538666565363331616362653033626466366537396532366464666133
36663230653734326533356230643838636633396436646362656362663732376339636636656131
32363936373230306138623236366538383930346630646636396633376636613366633635313335
37306431343561376566653337383831303431343831653866616634313236363862353764366135
31343962633835363361396436356466623735366366623835363563666562353639633463643232
30316236363833333534303063306535353635623939316436376332386536386665353165336234
32303062313661383966313766623731323238666539656563313565323439616232333233346338
65356334396532386231656466653930346134663263656365373463343234633064343234333539
64643634343630313435663964633761663564666361326338373065373031366137333635643734
38363262303863636564376632306565376366336266313236636266323937383230313632616261
64316136356233373133636663343634643831643462303636643730366533643239313437373334
65653863306639343163396130306366623132306333386631393035383562643963333139323163
61306237636232373435333361643939303439633266653163353462393964623566623364383963
35333337363661306261623165306362376462396262303136396565373339633431393430623365
39353537653933303466366231643830666666643937393666623832643066633139616466333531
38393138656531633935326433373831396163633538633861393964663839366266656566613435
61363062393535386234313464393063643166633832376466366538366565333438646137646430
31643433616561653665613961356437336639303436316335323736633239343565643533333434
39353466623761653337376462313263393836666130326331666532313533333230353436306338
65343832366339393062363939613833303333366432653635306166643136386633386364346465
38313062373036653135623166666333613038353034363432336230353437636365633331356164
36653331643235656631326365663264326431393762353463316238313038343734636234393738
33396437663832613262366635396161653263393435623366306639326661396138306534613836
33663236616134366234306466306435346333626336626136396462363939313833306130643435
34666430656438646465386366383566646636333564363865663037396535376237393937396262
30383864343832316338653233396431666337346535366565646231396466653938373636373035
37636564626530303132653963306630613932393138366461333136613961613537663863356238
39666337356339373466613236646161663232343162666138633031323765653330646463663735
63643966353961623636393536663234386364636432633861353264326138303063333332653037
32613064616666376661316366313731623833386263653966343063396231653561656635396130
31313861633763396566343733306231303661613130376436363633383361303861326333666437
35303931396661333331653662373462336536353764613462623763383437343062313733316566
62633739396562383236646338386137313630313136356431303236323262383136396632656362
31643366386161323965663865336366356532656563386537386565303039396138343562306538
35646166666335343535373666353734633039656336303031616437636436623361333261626439
64616335303238316361656230363066336432353334396164653537323562376334343734333462
64306436616231393965393533376434303166656434323937393931643030356635343533336438
6361653865323235653834623964626332643464656434633839
34313437653632323666613139306239353364663635373535316466343461386162393036643939
3064353433373365383238373437643832626230646536660a333433306631363963653664323465
36356237643762346137356263633562616166363161316130393238373934656166333539306234
6435323235356430330a656362343438333963663062313936383166653837326136663936303361
39643930303834643964383632336431303830363833626265313935316363393961643039313030
62353138623330653339373366376531656137613330646366396137313532366162363065333838
37343931633136343737326133323734643965646163323931643864653939346665356537346534
62626130383738333730623432326138323036666232663433353336633334613232613238613531
33363738346462623338623739346365343564626465323933356232663537636132643736633465
32383938613665383266326332363833613063356632666364333734346336323732626630343639
64653833373639333162643132393639353038343934326638346263623963613438626534626462
31323562633463326162306233393032376530613964646231313134663437333538383463656536
32346338393262633431326365653834373664363232326631643662643632333862376563393563
34343661666139653730626533613731613465386463323836376433383331376639306666313932
66333039656262346633313538623965383038653566616637616139636430643365343130383837
64346665646238333336643361366364623536323431393334386436316233396637363932663664
62666432353231353337343835633861636233623363383235343733653363613330656362656564
30346136666661363665313934623462616533356361353034316630653432393539366334613164
32666238313638386536303663623830363933353436626239323465643731393831336639306237
34613433653636393236303237633130646138396436613930336436613265313765393630303332
30306537396437653937363039386330353833396230333331323064313634623130363664323239
62633239306664643561336661383432386135396464613136373163613033666431356339396636
33353437393731356433626231316235303162633031346438336531306663346365616530376433
62353332313764613033616162393231646337623131613663663764306464336564326161336339
36373862313961623363643764383064613366643765383464323565636333356562343735613634
61643964366133633131303333623161646665343032653633666334636630383034656263386437
65316462643163666330333064613564373830633536353731366539626464626261353065343765
65636539343931333862303934323136353865376335373162653735663765663432623033646365
63303137393336643237336533306562353962666237636466383133333631633539643864326632
66323461353036633231386436343462616530653939323639313832623839376462336361356137
64343737666361376134626538313339316335636463646265663261363130323762656632346634
62343363393835646361333161376533663835386362663739386665356132376666306431353962
39373730316461636334313630383936336437323333663836396233656334393964306231396533
61326339633030663735383531623933386564333036653538353232343237383264643961363064
61373735373663396533366334366432653861666262316234626136313834356331666137316230
64633538646438303434313930643565653765616565316537326638313038356430653134396334
34386432613362626633363536393535363534316133393136363262323333336236363032323762
34366464383138626638343734303233383139356336613633303030316362656433386162613737
39353661323031663334346461646262613966656636316662303561636430303333643834373438
61646430366262373136356563616561336237363837663266383139323466666634386665346236
30363765613965343966653062346361306132353533626262633665666461343435663038303935
35313236346365626566316465313236326335356666626463343638393633303936336435626266
32316463613761383034653332626263646532656635653136623435333937623533613363356163
37373631303563633131376639343731333763373266643434313138313138613164623463343762
61393732323763663530333032303833303939393364393635326639313838366165626535613666
31666165306133316236633264366633333139373731346531633933633139396531363531376562
30353837653666376332313962626237376137653662643235353865363064663034653861623864
62386565326261616465643934616335326131316564363033643561623566643030643535313265
62626637643866653731363864383061613861343837376162333366373935326631386234666466
66623461313035323966303430663834353135373961323234656232633733646533623236623933
31393139343332373263666632306565656336346335303239666230373139636362656334656436
38333261393764643835633666343261323034396562353939383765353539396663613166616462
65643062346635636639663134363430366139633636333966306166656164333566306438656564
32383831643134636565373464353231663562353530313765376565376464653330653838373665
65646565663932316666356263396563663764646662313936393063353366393763393464366163
66363362653735303132613064363836343765323461376238626435626536613534333966373330
38633532393563353663653232633263303961373866303139643637376630666138343262653330
32356239316466363362383461343631356134613031653563653434313865616637616237616436
33383364323138613639366136666230386337353438653763343436663662363463376637353463
35376166383763333133663663653932376133333266623532623735343237636161323937396461
33383863303439666437376131303465346361613535323364306634363733303561366339663032
64643963643065663164316634643037316435613539613362373462323861383562306230643965
66626362613333666537653265373337323361356364313839333039316139393561333234383637
36386362396466313034366334313136386265373333353932386366313434643931333337653238
36383164316139663963363461303339613931326131653633393562653061353961626435643232
61626630373466303463396433633166383831303839386532663966313339653238363361383965
33306134653839313931643232323262656363616336373332356462356431373834653032373862
33343664646634326136316633653162633335343239373434633737313866326532383866646337
31643336346464616233393761636132663830383038323764323033626362333365353663626664
63623165383737373039383337346262383431373131633530376534323431333464666131363035
37626333623965623236363034336261346665323534623234346366363464663232386431636564
33616162383539303632316661363730386637356232353337663431613738343864343633316339
32303535363232393336333232356238303231343333373338646565323436343930303533353232
66343939656564643365383439393633363661373566656261306364373532616232386234386630
34393736333265303062383036663833326235346464323833623866613036323830386635613032
34613063303861316431393837613033353732636437666261383033633132326636616433363237
63653861623166646238663061306631353738316237356137663561386662333038303737653938
34313133616630323462306537336161373665346564613938313963303231323366366534303666
65656432386335353739623861363332393333316230656662643735353462393866663333316532
62616235616138396264396561666134386661383830643539663865376466653863306161653439
32313335623465396635623037336237343930386663303038366638623562356334396233633334
66313139333839396165323862346533346362656537643638323237633064306230653461653766
33343638396234626263666230376365396461383234363264656461346537303962613033626230
33653265653735343435383737343762336662373166396530636435323239393031663936643532
37646434633733646137313661666538643164383837643165383039383335386239373566333066
31336363343733373130616331366366656336333364303936363762333766646439353836616330
63643830343938363339316434376237386162356439383362643436613365386561373836613130
30616632346436613065366239333634316364306236643466643536326365643163336332313234
36346332653931646666623937303132383536386434396666323166653337646433303932376535
31373538366563363861323730333936656538303664313632326335383930316565666262313531
34623139633539666132656230363963656631376334393132336535623664346434313965646438
39623032383164643638383836353165343562623565666462663235616138396166316631313431
36616166383133316533373261313366336238383663616565343732363665636332386539353534
64653232386538323430323166316566333538363736353761316130663331373465623661643332
34666165626366646433663237386264366162333039613334653237663661613633316131363736
34366164636663616562366561383036663637663633313631626634306635303263636638613835
39666462353535303437303065393137383866343330323335343663663531623664323964393934
63353333373764353838393330303634373362346532313032666233316666336333343935633263
32316431333566353564326339666237623964613666663666643863353633643865663037383231
32666365643065313563323430333164353939626435663430306464383930366230343334306566
34333634333934653462663036383439623264393834616438386561396237323238393862353337
64306565633662626434633637633333313663343665363532663863313061316431636166353735
37616361653065303238353134316537303937336431323736393265346536653364393933373635
61666139643338666636643139336139633564323337656536356632353736386434343731633631
61326138343461623936303731383138663030663738373866356561363538656230386136633533
61656464303464623866343334363030346333656636663731373863333166323061336664643333
38383637623035323933333632396332306438396534633830623861663634626462303432316665
62336538383734663332306238366164366631343565393432316165643436366237386464633838
32353162383333333333353137323034386631646666306332613538316265373964663636643463
63343733636636336561326366363161333535623463386161396464333231343031366434366264
30373737353036363535326433336135633663386361386630336533396638393863393034343666
32393461356330353462633931633761323133386534323731643735393339633735623735653439
63343365363761373735326165306630346663306232353465613261646135663265373061373437
30303163363339613465373637363637636636653862323662613161613436616238343262633462
34626266303639313161356234343264356438623261383735363539623938613137316466636232
34396562313933303537346535386663623366313833633232343030666539356432363962613338
63653531343233316265373839633131366630373236613131616132643338666365663735383536
65663030356630333164386636376630343165383061386131313933656562626431353466653534
61613932353939396131343331636464366534353033313732653836336636633939306235386564
61373132373633646436313038613463353535666530356162633737633461333639623331633266
31376335383661326137366464313938336131346230303335626230356633633065303334353638
66303864633132363639653834363137643462646361393564333261383231366266616139323437
31356139366364323830393264646232316664633536373965393564306437653138656534323363
34363734373537303433306337393130346233613364336435663432663534653132396335343237
61336261613739346462663261343537616664633139346639373132666562346662393864653634
39656132316366643232656132366238643565343737333439313039633762626638643465653264
36343239336433383738633962343766346231653966346635366363343666313731643366336562
65613535333361646363396664653363626463623561393064643338303232373336323761636432
37393562626136623166363766643735333238616336363732343665366539636363383530326532
38316663356133373765396165323634646335613036353037326366613837643664656339336438
66396466373734646661633361363534376433656235666533626433343332383038393836373235
65646231353161343337663538346432636131366262663339356662343636623239353132316130
62666536663630303634366431363662393635613266653032303330613935633435383966656438
31303235353033643239366132656431623731386235643361616337636564376138316231386561
62326233356366616630343739643762313834353761646562636536363365393037393536393665
32323933643330396261633437333761636530313638343064316233363937633961386462646261
65376330303461643861376466346638343738393232663466373433636334343564646430336531
61336133656637336337623565393534616634623662393030376532623763343834663265383032
34376237306266656366656365363366633765653630623632643634316561376162366439396562
38353732333732326261333761633433636330666561323864386465313739313438393263353739
39343734656330353936336539373665363665333261303232393032653233333665353638393334
31393861333337623038396531306230303335646333343236343936336464373735363434613636
38623234326566313834373064663132623034363830653866393531313062383963353563613863
36636463623133653931633864343132373538326461323538316537373130373638633533306433
35653437386436386361646533623033363139306133616136633234636539363734333339316335
64356535373666373630373536353937626230326231616161626438653965663233636536343933
34316430373634383535633238633538323133396539623665623937633335643236663762326435
33356161316661653539613930653636653830643534623138396438303538363237633565303966
39646530343330336366383933343766636337303861656632663831616362643236323163363534
35373132636330613937363330653031376530623162383262376639333732316461613938363634
31373866633530386564393138613164353933643061373437653065386230663339383232626535
38633338653231366466373634303865313964373330393766653462336466653436346362613232
63663965623936333938326366376263633538383364323831373166646130326438343364336666
35306332356132643361353536303265616233656163306261386139323930396336613535386665
65333163633434633833386236636630393434616136633837393737643630646330356636306264
66316438666632633831363630396531383137366133356461376135633865353963613463303464
64653764616463626135313166323930623561646666386433313135306564653738313235613662
33366664326364613838386564666535663536356266633832373066383932636666336366623936
32303039623135666636633936333836366337363834333864376265383966373434326664306439
31366666376363316631383238666635636137356466363431653461343266663033333834643237
34316533373030656639383236633266383230316432383665393666323264656137

@ -0,0 +1,7 @@
- name: deploy home services
hosts: mediaserver
remote_user: "{{ remote_user }}"
tasks:
- debug: msg="Deploying home services stack to local server"
roles:
- { name: home-net, tags: ['home-net'] }

@ -0,0 +1,81 @@
---
# deploy a halo host
# boot strap server
- name: Install aptitude using apt
apt: name=aptitude state=latest update_cache=yes force_apt_get=yes
- name: Install required system packages for docker install
apt: name={{ item }} state=latest update_cache=yes
loop: [ 'apt-transport-https', 'ca-certificates', 'software-properties-common']
- name: Add Docker GPG apt Key
apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
- name: Add Docker Repository
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu bionic stable
state: present
- name: Add tailscale GPG apt Key
apt_key:
url: https://pkgs.tailscale.com/stable/debian/bullseye.noarmor.gpg
state: present
- name: Add tailscsale Repository
apt_repository:
repo: deb https://pkgs.tailscale.com/stable/debian bullseye main
state: present
- name: Update apt
apt: update_cache=yes
- name: Install required system packages
apt: name={{ sys_packages }} state=latest
- name: add 'josiah' to docker group
user:
name='josiah'
groups=docker
append=yes
- name: install python packages
pip:
name: ["jsondiff", "docker"]
# init new swarm, set up
- name: Init a new swarm with default parameters
docker_swarm:
state: present
advertise_addr: "100.76.26.36"
- name: copy over awful-All config files
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0777
with_items:
- {src: 'home-compose.yml', dest: '/home/josiah/apps/home-compose.yml'}
# you have to force remove the whole stack for some changes to take effect
# I have no idea which ones, but this solved a problem for me with traefik conifgs + multi networks.
- name: Remove the home-net stack
block:
- name: Remove the home-net stack
docker_stack:
state: absent
name: halo
compose:
- /home/josiah/apps/home-compose
- name: Pause so the network gets deleted too
pause:
seconds: 15
- name: Redpeploy
docker_stack:
state: present
name: home-net
compose:
- /home/josiah/apps/home-compose.yml

@ -0,0 +1,141 @@
version: '3.8'
networks:
pubnet:
external: false
volumes:
traefik_acme:
traefik_logs:
docs:
docspell-postgres_data:
docspell-solr_data:
services:
# The restserver and joex containers defined here are configured
# using env variables. Both must connect to the same database and
# solr instance. More information on configuring can be found here:
# https://docspell.org/docs/configure
#
# Please replace the values of the following with a custom secret
# string:
#
# - DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET
# - DOCSPELL_SERVER_AUTH_SERVER__SECRET
# - DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE
# (use the same value at the consumedir container!)
#
# After creating an account, you may want to set signup mode to
# "closed" or to "invite". When using invite, you must also set
# DOCSPELL_SERVER_BACKEND_SIGNUP_NEW__INVITE__PASSWORD to some
# secret.
restserver:
image: docspell/restserver:latest
ports:
- "7880:7880"
environment:
- TZ=Europe/Berlin
- "DOCSPELL_SERVER_INTERNAL__URL=http://docspell-restserver:7880"
- "DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET={{ vault_DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET }}"
- "DOCSPELL_SERVER_AUTH_SERVER__SECRET={{ vault_DOCSPELL_SERVER_AUTH_SERVER__SECRET }}"
- "DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD }}"
- "DOCSPELL_SERVER_BACKEND_JDBC_URL=jdbc:postgresql://db:5432/dbname"
- "DOCSPELL_SERVER_BACKEND_JDBC_USER={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_USER }}"
- "DOCSPELL_SERVER_BIND_ADDRESS=0.0.0.0"
- "DOCSPELL_SERVER_FULL__TEXT__SEARCH_ENABLED=true"
- "DOCSPELL_SERVER_FULL__TEXT__SEARCH_SOLR_URL=http://docspell-solr:8983/solr/docspell"
- "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_ENABLED=true"
- "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_ENABLED=true"
- "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE={{ vault_DOCSPELL_INTEGRATION_PASSWORD }}"
- "DOCSPELL_SERVER_BACKEND_SIGNUP_MODE=open"
- "DOCSPELL_SERVER_BACKEND_SIGNUP_NEW__INVITE__PASSWORD={{ vault_DOCSPELL_SERVER_BACKEND_INVITE_SIGNUP_PASSWORD }}"
- "DOCSPELL_SERVER_BACKEND_ADDONS_ENABLED=false"
depends_on:
- solr
- db
joex:
image: docspell/joex:latest
## For more memory add corresponding arguments, like below. Also see
## https://docspell.org/docs/configure/#jvm-options
# command:
# - -J-Xmx3G
ports:
- "7878:7878"
environment:
- TZ=Europe/Berlin
- "DOCSPELL_JOEX_APP__ID=joex1"
- "DOCSPELL_JOEX_PERIODIC__SCHEDULER_NAME=joex1"
- "DOCSPELL_JOEX_SCHEDULER_NAME=joex1"
- "DOCSPELL_JOEX_BASE__URL=http://docspell-joex:7878"
- "DOCSPELL_JOEX_BIND_ADDRESS=0.0.0.0"
- "DOCSPELL_JOEX_FULL__TEXT__SEARCH_ENABLED=true"
- "DOCSPELL_JOEX_FULL__TEXT__SEARCH_SOLR_URL=http://docspell-solr:8983/solr/docspell"
- "DOCSPELL_JOEX_JDBC_PASSWORD={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD }}"
- "DOCSPELL_JOEX_JDBC_URL=jdbc:postgresql://db:5432/dbname"
- "DOCSPELL_JOEX_JDBC_USER={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_USER }}"
- "DOCSPELL_JOEX_ADDONS_EXECUTOR__CONFIG_RUNNER=docker,trivial"
- "DOCSPELL_JOEX_CONVERT_HTML__CONVERTER=weasyprint"
ports:
- "7878:7878"
depends_on:
- solr
- db
## Uncomment when using the "docker" runner with addons
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - /tmp:/tmp
# The consumedir container watches a directory for files to upload
# to docspell restserver. This uses the `dsc` tool. For information
# on the available options, see `dsc --help`.
# https://github.com/docspell/dsc
#
# The value after `Docspell-Integration` must match the secret
# specified at the restserver via
# DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE.
#
# The --not-matches "**/.*" option is to exclude hidden files.
consumedir:
image: docspell/dsc:latest
command:
- dsc
- "-d"
- "http://docspell-restserver:7880"
- "watch"
- "--delete"
- "-ir"
- "--not-matches"
- "**/.*"
- "--header"
- "Docspell-Integration:{{ vault_DOCSPELL_INTEGRATION_PASSWORD }}"
- "/opt/docs"
volumes:
- "/home/josiah/apps/docspell/docs:/opt/docs"
depends_on:
- restserver
db:
image: postgres:15.2
volumes:
- docspell-postgres_data:/var/lib/postgresql/data/
environment:
- "POSTGRES_USER={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_USER }}"
- "POSTGRES_PASSWORD={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD }}"
- "POSTGRES_DB=dbname"
solr:
image: solr:9
volumes:
- docspell-solr_data:/var/solr
command:
- bash
- -c
- 'precreate-core docspell; exec solr -f -Dsolr.modules=analysis-extras'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8983/solr/docspell/admin/ping"]
interval: 1m
timeout: 10s
retries: 2
start_period: 30s

@ -0,0 +1 @@
sys_packages: [ 'curl', 'vim', 'git', 'emacs', 'build-essential', 'mosh', 'python', 'python3-pip', 'docker', 'ca-certificates', 'curl', 'gnupg', 'lsb-release', 'docker-ce', 'docker-ce-cli', 'containerd.io', 'docker-compose-plugin', 'tailscale']

@ -1,55 +1,33 @@
---
# deploy a halo host
- name: Import raspberry pi tasks
import_tasks: rpi.yml
when: base_rpi
# boot strap server
- name: Install aptitude using apt
apt: name=aptitude state=latest update_cache=yes force_apt_get=yes
- name: Make sure we have a 'sudo' group
group:
name: sudo
state: present
- name: Allow sudo group to have passwordless sudo
lineinfile:
path: /etc/sudoers
state: present
regexp: '^%sudo'
line: '%sudo ALL=(ALL) NOPASSWD: ALL'
validate: '/usr/sbin/visudo -cf %s'
- name: Create a new regular user with sudo privileges
user:
name: "{{ create_user }}"
state: present
groups: sudo
append: true
create_home: true
shell: /bin/bash
- name: Install required system packages for docker install
apt: name={{ item }} state=latest update_cache=yes
loop: [ 'apt-transport-https', 'ca-certificates', 'software-properties-common']
- name: Set authorized key for remote user
authorized_key:
user: "{{ create_user }}"
- name: Add Docker GPG apt Key
apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
key: "{{ copy_local_key }}"
- name: Disable password authentication for root
lineinfile:
path: /etc/ssh/sshd_config
- name: Add Docker Repository
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu bionic stable
state: present
regexp: '^#?PermitRootLogin'
line: 'PermitRootLogin no'
- name: Add syncthing release signing key.
- name: Add tailscale GPG apt Key
apt_key:
url: https://syncthing.net/release-key.txt
url: https://pkgs.tailscale.com/stable/debian/bullseye.noarmor.gpg
state: present
- name: Add syncthing apt repo
- name: Add tailscsale Repository
apt_repository:
repo: deb https://apt.syncthing.net/ syncthing stable
filename: syncthing
state: present
repo: deb https://pkgs.tailscale.com/stable/debian bullseye main
state: present
- name: Update apt
apt: update_cache=yes
@ -57,13 +35,47 @@
- name: Install required system packages
apt: name={{ sys_packages }} state=latest
- name: Restart sshd
service:
name: sshd.service
state: restarted
- name: add 'josiah' to docker group
user:
name='josiah'
groups=docker
append=yes
- name: install python packages
pip:
name: ["jsondiff", "docker"]
# init new swarm, set up
- name: Init a new swarm with default parameters
docker_swarm:
state: present
advertise_addr: "100.76.26.36"
- name: copy over awful-All config files
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0777
with_items:
- {src: 'home-compose.yml', dest: '/home/josiah/apps/home-compose.yml'}
- name: Enable and start syncthing
systemd:
name: "{{ syncthing_personal_service }}"
state: started
enabled: yes
# you have to force remove the whole stack for some changes to take effect
# I have no idea which ones, but this solved a problem for me with traefik conifgs + multi networks.
- name: Remove the home-net stack
block:
- name: Remove the home-net stack
docker_stack:
state: absent
name: halo
compose:
- /home/josiah/apps/home-compose
- name: Pause so the network gets deleted too
pause:
seconds: 15
- name: Redpeploy
docker_stack:
state: present
name: home-net
compose:
- /home/josiah/apps/home-compose.yml

@ -0,0 +1,141 @@
version: '3.8'
networks:
pubnet:
external: false
volumes:
traefik_acme:
traefik_logs:
docs:
docspell-postgres_data:
docspell-solr_data:
services:
# The restserver and joex containers defined here are configured
# using env variables. Both must connect to the same database and
# solr instance. More information on configuring can be found here:
# https://docspell.org/docs/configure
#
# Please replace the values of the following with a custom secret
# string:
#
# - DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET
# - DOCSPELL_SERVER_AUTH_SERVER__SECRET
# - DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE
# (use the same value at the consumedir container!)
#
# After creating an account, you may want to set signup mode to
# "closed" or to "invite". When using invite, you must also set
# DOCSPELL_SERVER_BACKEND_SIGNUP_NEW__INVITE__PASSWORD to some
# secret.
restserver:
image: docspell/restserver:latest
ports:
- "7880:7880"
environment:
- TZ=Europe/Berlin
- "DOCSPELL_SERVER_INTERNAL__URL=http://docspell-restserver:7880"
- "DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET={{ vault_DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET }}"
- "DOCSPELL_SERVER_AUTH_SERVER__SECRET={{ vault_DOCSPELL_SERVER_AUTH_SERVER__SECRET }}"
- "DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD }}"
- "DOCSPELL_SERVER_BACKEND_JDBC_URL=jdbc:postgresql://db:5432/dbname"
- "DOCSPELL_SERVER_BACKEND_JDBC_USER={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_USER }}"
- "DOCSPELL_SERVER_BIND_ADDRESS=0.0.0.0"
- "DOCSPELL_SERVER_FULL__TEXT__SEARCH_ENABLED=true"
- "DOCSPELL_SERVER_FULL__TEXT__SEARCH_SOLR_URL=http://docspell-solr:8983/solr/docspell"
- "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_ENABLED=true"
- "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_ENABLED=true"
- "DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE={{ vault_DOCSPELL_INTEGRATION_PASSWORD }}"
- "DOCSPELL_SERVER_BACKEND_SIGNUP_MODE=open"
- "DOCSPELL_SERVER_BACKEND_SIGNUP_NEW__INVITE__PASSWORD={{ vault_DOCSPELL_SERVER_BACKEND_INVITE_SIGNUP_PASSWORD }}"
- "DOCSPELL_SERVER_BACKEND_ADDONS_ENABLED=false"
depends_on:
- solr
- db
joex:
image: docspell/joex:latest
## For more memory add corresponding arguments, like below. Also see
## https://docspell.org/docs/configure/#jvm-options
# command:
# - -J-Xmx3G
ports:
- "7878:7878"
environment:
- TZ=Europe/Berlin
- "DOCSPELL_JOEX_APP__ID=joex1"
- "DOCSPELL_JOEX_PERIODIC__SCHEDULER_NAME=joex1"
- "DOCSPELL_JOEX_SCHEDULER_NAME=joex1"
- "DOCSPELL_JOEX_BASE__URL=http://docspell-joex:7878"
- "DOCSPELL_JOEX_BIND_ADDRESS=0.0.0.0"
- "DOCSPELL_JOEX_FULL__TEXT__SEARCH_ENABLED=true"
- "DOCSPELL_JOEX_FULL__TEXT__SEARCH_SOLR_URL=http://docspell-solr:8983/solr/docspell"
- "DOCSPELL_JOEX_JDBC_PASSWORD={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD }}"
- "DOCSPELL_JOEX_JDBC_URL=jdbc:postgresql://db:5432/dbname"
- "DOCSPELL_JOEX_JDBC_USER={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_USER }}"
- "DOCSPELL_JOEX_ADDONS_EXECUTOR__CONFIG_RUNNER=docker,trivial"
- "DOCSPELL_JOEX_CONVERT_HTML__CONVERTER=weasyprint"
ports:
- "7878:7878"
depends_on:
- solr
- db
## Uncomment when using the "docker" runner with addons
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - /tmp:/tmp
# The consumedir container watches a directory for files to upload
# to docspell restserver. This uses the `dsc` tool. For information
# on the available options, see `dsc --help`.
# https://github.com/docspell/dsc
#
# The value after `Docspell-Integration` must match the secret
# specified at the restserver via
# DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE.
#
# The --not-matches "**/.*" option is to exclude hidden files.
consumedir:
image: docspell/dsc:latest
command:
- dsc
- "-d"
- "http://docspell-restserver:7880"
- "watch"
- "--delete"
- "-ir"
- "--not-matches"
- "**/.*"
- "--header"
- "Docspell-Integration:{{ vault_DOCSPELL_INTEGRATION_PASSWORD }}"
- "/opt/docs"
volumes:
- "/home/josiah/apps/docspell/docs:/opt/docs"
depends_on:
- restserver
db:
image: postgres:15.2
volumes:
- docspell-postgres_data:/var/lib/postgresql/data/
environment:
- "POSTGRES_USER={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_USER }}"
- "POSTGRES_PASSWORD={{ vault_DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD }}"
- "POSTGRES_DB=dbname"
solr:
image: solr:9
volumes:
- docspell-solr_data:/var/solr
command:
- bash
- -c
- 'precreate-core docspell; exec solr -f -Dsolr.modules=analysis-extras'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8983/solr/docspell/admin/ping"]
interval: 1m
timeout: 10s
retries: 2
start_period: 30s

@ -1,4 +1 @@
sys_packages: [ 'curl', 'vim', 'git', 'fail2ban', 'mosh', 'emacs', 'build-essential','dnsutils', 'syncthing' ]
create_user: josiah
copy_local_key: "{{ lookup('file', lookup('env','HOME') + '/.ssh/home-net.pub') }}"
syncthing_personal_service: syncthing@josiah
sys_packages: [ 'curl', 'vim', 'git', 'emacs', 'build-essential', 'mosh', 'python', 'python3-pip', 'docker', 'ca-certificates', 'curl', 'gnupg', 'lsb-release', 'docker-ce', 'docker-ce-cli', 'containerd.io', 'docker-compose-plugin', 'tailscale']

@ -77,7 +77,6 @@ services:
- "/media/usenet/tv:/data/tv"
- "/media/usenet/audio/:/data/music"
- "/media/usenet/movies/:/data/movies"
- "/media/usenet/itunes-synology/iTunes Media/Automatically Add to iTunes.localized/:/data/itunes"
- "/media/usenet/book-library/yet-to-be-added:/data/books"
labels:
- "traefik.enable=true"

@ -1,8 +0,0 @@
---
- name: setup on prem portal wg host.
hosts: larva.home.jowj.net
tasks:
- debug: msg="Deploying wg portal"
roles:
- { name: home-net, tags: ['home-net'] }
Loading…
Cancel
Save