1
0

Monitoring: add separate docker network

This commit is contained in:
2025-07-29 17:03:23 +03:00
parent 61c757646a
commit 552635b856
15 changed files with 127 additions and 181 deletions

View File

@@ -6,10 +6,10 @@ services:
user: '{{ user_create_result.uid }}:{{ user_create_result.group }}'
restart: 'unless-stopped'
networks:
- "{{ web_proxy_network }}"
- "web_proxy_network"
volumes:
- "{{ config_dir }}:/config"
networks:
{{ web_proxy_network }}:
web_proxy_network:
external: true

View File

@@ -15,8 +15,8 @@ services:
- {{ data_dir }}:/data
- {{ config_dir }}:/config
networks:
- "{{ web_proxy_network }}"
- "web_proxy_network"
networks:
{{ web_proxy_network }}:
web_proxy_network:
external: true

View File

@@ -13,7 +13,7 @@ services:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
- "{{ web_proxy_network }}"
- "web_proxy_network"
environment:
- "USER_UID=${USER_UID}"
- "USER_GID=${USER_GID}"
@@ -29,5 +29,5 @@ services:
- "GITEA__mailer__FROM=gitea@vakhrushev.me"
networks:
{{ web_proxy_network }}:
web_proxy_network:
external: true

View File

@@ -10,7 +10,7 @@ services:
restart: unless-stopped
networks:
- "gramps_network"
- "{{ web_proxy_network }}"
- "web_proxy_network"
volumes:
- "{{ (data_dir, 'gramps_db') | path_join }}:/root/.gramps/grampsdb" # persist Gramps database
- "{{ (data_dir, 'gramps_users') | path_join }}:/app/users" # persist user database
@@ -61,9 +61,12 @@ services:
restart: unless-stopped
networks:
- "gramps_network"
- "monitoring_network"
networks:
gramps_network:
driver: bridge
{{ web_proxy_network }}:
web_proxy_network:
external: true
monitoring_network:
external: true

View File

@@ -6,9 +6,9 @@ services:
ports:
- "127.0.0.1:{{ homepage_port }}:80"
networks:
- "{{ web_proxy_network }}"
- "web_proxy_network"
networks:
{{ web_proxy_network }}:
web_proxy_network:
external: true

View File

@@ -10,7 +10,7 @@ services:
condition: service_healthy
networks:
- "miniflux_network"
- "{{ web_proxy_network }}"
- "web_proxy_network"
environment:
- DATABASE_URL=postgres://{{ miniflux_postgres_user }}:{{ miniflux_postgres_password }}@miniflux_postgres/{{ miniflux_postgres_database }}?sslmode=disable
- RUN_MIGRATIONS=1
@@ -38,7 +38,7 @@ services:
- POSTGRES_DB={{ miniflux_postgres_database }}
networks:
- "miniflux_network"
- "{{ web_proxy_network }}"
- "monitoring_network"
volumes:
- {{ postgres_data_dir }}:/var/lib/postgresql/data
healthcheck:
@@ -49,5 +49,7 @@ services:
networks:
miniflux_network:
driver: bridge
{{ web_proxy_network }}:
web_proxy_network:
external: true
monitoring_network:
external: true

View File

@@ -11,7 +11,8 @@ services:
security_opt:
- apparmor:unconfined
networks:
- "{{ web_proxy_network }}"
- "web_proxy_network"
- "monitoring_network"
volumes:
- "{{ config_dir }}:/etc/netdata"
- "{{ (data_dir, 'lib') | path_join }}:/var/lib/netdata"
@@ -33,5 +34,7 @@ services:
NETDATA_EXTRA_DEB_PACKAGES: "fail2ban"
networks:
{{ web_proxy_network }}:
web_proxy_network:
external: true
monitoring_network:
external: true

View File

@@ -1,3 +1,3 @@
jobs:
- name: fail2ban
update_every: 5 # Collect Fail2Ban jails statistics every 5 seconds
update_every: 15 # Collect Fail2Ban jails statistics every 15 seconds

View File

@@ -1,6 +1,11 @@
autodetection_retry: 0
update_every: 15
jobs:
- name: outline_db
dsn: 'postgresql://netdata:{{ netdata_postgres_password }}@outline_postgres:5432/outline'
collect_databases_matching: '!postgres'
- name: miniflux_db
dsn: 'postgresql://netdata:{{ netdata_postgres_password }}@miniflux_postgres:5432/miniflux'
collect_databases_matching: '!postgres'

View File

@@ -1,5 +1,4 @@
update_every: 5
autodetection_retry: 0
update_every: 15
jobs:

View File

@@ -13,7 +13,7 @@ services:
- "127.0.0.1:{{ outline_port }}:3000"
networks:
- "outline_network"
- "{{ web_proxy_network }}"
- "web_proxy_network"
environment:
NODE_ENV: 'production'
URL: 'https://outline.vakhrushev.me'
@@ -58,7 +58,8 @@ services:
container_name: outline_redis
restart: unless-stopped
networks:
- "outline_network"
- "outline_network"
- "monitoring_network"
outline_postgres:
image: postgres:16.3-bookworm
@@ -68,7 +69,7 @@ services:
- {{ postgres_data_dir }}:/var/lib/postgresql/data
networks:
- "outline_network"
- "{{ web_proxy_network }}"
- "monitoring_network"
environment:
POSTGRES_USER: '{{ outline_postgres_user }}'
POSTGRES_PASSWORD: '{{ outline_postgres_password }}'
@@ -77,5 +78,7 @@ services:
networks:
outline_network:
driver: bridge
{{ web_proxy_network }}:
web_proxy_network:
external: true
monitoring_network:
external: true

View File

@@ -5,8 +5,8 @@ services:
container_name: rssbridge_app
restart: unless-stopped
networks:
- "{{ web_proxy_network }}"
- "web_proxy_network"
networks:
{{ web_proxy_network }}:
web_proxy_network:
external: true

View File

@@ -8,7 +8,7 @@ services:
restart: unless-stopped
user: '{{ user_create_result.uid }}:{{ user_create_result.group }}'
networks:
- "{{ web_proxy_network }}"
- "web_proxy_network"
volumes:
- "{{ data_dir }}:/data"
environment:
@@ -28,5 +28,5 @@ services:
networks:
{{ web_proxy_network }}:
web_proxy_network:
external: true

View File

@@ -29,5 +29,10 @@
- name: Create a network for web proxy
community.docker.docker_network:
name: "{{ web_proxy_network }}"
name: "web_proxy_network"
driver: "bridge"
- name: Create a network for monitoring
community.docker.docker_network:
name: "monitoring_network"
driver: "bridge"

View File

@@ -1,153 +1,79 @@
$ANSIBLE_VAULT;1.1;AES256
63373036366166656237633763383561363561323666346539353465653164393563353131636162
6330633963646139633734373466336161656133343736610a363264333136343131373964303837
30333663333433633366333333363035313937383130643635653031613238626434356662366366
6663396465666330340a623164663965353364383338373062383065376331313665316463383565
34326435643363633235656436633839333832626138623432626134616632383533326363326466
62393761663633636263656437316539653864306234343733373732623731376330323031356662
64386364393730333636343630363230656135363536303537343036616139616131323933336138
34336666316335323737626633383138383862656330656561363063313431653063363037656461
39386431323763613332396539353738356164346634396437313934646632393766613666383234
66333532326238626531303964623439333630663265616566636339303465653061353066353866
39323866346362366230663639663464333535313939643938343261343963636537333337636337
39383466346665653930313235336535316137616365366431363166623364633261663336623666
62663365663634336566386265353433393461393962373364643964346665613761616563306461
34376134333037626262393938656134353831633563346261343931663737303664663262356339
65306432363461323235356265303338386466653665656633633439623430663133663562613132
33363762653538643362646263653164313164323539393563653063346234393331656430383538
38626565643138663230383432626466313434303263616436656134376638653565623037306635
38313539396631623861316566396235356336643439623731623264376163346230613638333334
33613930396238396534353463656336323033316239373361303233356339643630626431323338
32613032363337383965313266343362313437633263376464613136653932663833633663623261
32303432353736636139386233633762333363323431633039356536643237306439376139613935
34353264346565356539363662346631306566373130623562653435303166346163653563333062
39623563333637653537616634383739313133623633616238316566356239646431336230633636
39363861313161323530363961323530633838623437316337323566663532316238623039323663
31656561626336613233343635353363383161346435633934633239623232393963383536353630
33326239303531363066336565313134646135643433636437313334303030383731653637396432
38643532353331633032366438623566313237383363633239343063356632613166336561653561
37386561373265323565386365366664326130613633643737356439653164663963396230653932
63386337323463666533613733623864346365393135623465326239333163303833353162303038
65363362353130396239323831343330643432396361373262613836313438313262306431623565
30376532613133313236396530396539306464383265376164616136663761336366666165623130
38343435616631336633353761316331323664333464653564633632336439353066326435393234
39333533633634383534663539323038636639366537623433316330353536323361653836373533
63393637653234633033393130363939386132623032353939636366303934636162373761353430
64626633343239356563373537306361643337303134613364316561303161363434333335356232
37636637303033303835366230396563313432376530373438623639633034663161626536366262
39306239366130636665623762646232333065373261623032663332383436376164306666353439
32353939336131383534663236313862396230323265623437383766373866633663353435643565
38373432383065383938626234393033646532666364353637323833383237333432363631643236
61623362366239323031316130346136396135643831303964383162333930386364356164353936
65353838333361363032323163363138323835376137613861316131663331326334353535633662
33623139383535366361326635326532613035396364383937373661643938323639303631373938
36366331386633356161636639653637366138633766333734623338313837633836613032636634
30376334343064316639623932366337336132663262316135623161626634323366353862346135
30383865316235663163636534613534353530343366626135613263326337666339306532333435
37616663663364616461643366376532366332336630623133636437656532376231386130363262
39326335633765346338346334303537363535646230373262626262396131393938643133636564
36356434313963326631336663396161666463663633343631653138393233623662633730356663
33363835343833326462646437666131663464306631636162316632613962613931653833393630
37366335653739333632656363303631353337353366386163666261623964666562343366666334
31613935626635323263663666303861363862303665656466613035383336633734613166613264
35316536333339333866326137376531316261333965323962663661336666303866376138623937
30633330363265386662643638366665316230613636336165646132666231333262323837626634
38616232616465646130623136376138643637646232316564386135376561623865353566306161
64306538313636373363666132616635396462363965316633633164353463356630393265353263
31633661386335303632616239646161373734636632356437333134613939653761626231653061
36623132613461333966333135333031346438663135633839656561323130343433663362336666
31353734313039636562613138333033333437643537303739393037646639656666373432316366
31363265316161626663313564666630353161386165333965396661643430323030313564326531
63616663366662363035363238343364336563613238366436356233353430386664306530346161
33613664346563363865326338336634623134333265383737323734653836633639663534616331
30353830326663306133626234356334363963613064396463376431383032366234333531396634
65633163363933343262313463336230633764326230623761356566326630623738363239623766
66313631346563643634333263353637393236336435656338376665373035363030633437373665
38643337613464393531643561316465623966346663616566393565356132333239333861663238
64613265626266616664303538313930336362373030353531383834393934323264336139303066
63306135333230326338666433356363333333323961613932346533326234313530616635363036
37613662386137633063623337333532666561393962663236653664656337333636643934636631
64363930646163336339336664306564326164323137383739646535323337386163626431356165
61363737353234663561643833396330633930313665613735353937633035343035373435306230
34363834653136643935643765386666376432353638646434363266396461393631613562616162
33646535326337303735353261326162386237323436313538623062646233336136643730626539
38333436623461636336353465343035663966313634313036616266356631616137643436396539
61313437336337396638326563383563386631363461626363396434613037326634313464616134
39666361343233323035383039623462613837646262643731356165343039663462363332643766
64663937373733326138666562363137316361646265376166356233363263653165303631376431
65633964633161353764646464386537326262613230313236306435393763656539373230306164
30356234353131633539383631636534393263396531623133343964326463383335613063636365
35376566633737623765636661333631616263623562643735353232326136303836643730613965
32353936396634393432633664616636306637643934353032633463343634396431386564326361
35313834656338656435386431653039393438323937643235666136316164366366653039663832
33653437326532393330363535356639303632333838303437363435343136343634616337616635
62333833396661383530303561333232616135343035626634653561643530646435616633333838
62383136386536643135356639623735383663353236303139386330626166373863366637333263
30346234643130653833643864386638366430383961363436363739303761336235613865306261
34303735356636633331326638303635363433616466393530363737616165383038633637323236
30343833343935353231306233303666343735383937646565306464633230326536633735333366
65333232646364623736363263376438636664333738346435326632656330613162323136646562
62653264663862353937316236353964366261313132353137303535643366656530613766346237
39363633303163623430323566633738653535343461336234356231306662346638326538313933
63666435383463346664623131646536313466613733653630643734356663363738336361663138
34313230626161646537353138656637303163623230346633623430323034653531383163633362
35353766336162353034613139363139316163613938666161373835393130623834323532396330
61383962646463376234393362613265353137316436353832663131666239383534323130366366
39336230313331313635633264623261663462613636663631353038633135353264366134386139
34306134643862306161646337643462326239316131373834393763643165343862663732396139
66363537623330346162326532613339373961393539393334323633613434666564626162303265
39386265626364363233323162343837346130656136383463623562313932386436636235336237
37646266306234656263656564353031626562663062313634666461383265663638626163386432
62383830653132623638633934303762333663386637643266353634383033373234353665313336
32633762323631663966386533313032633635383263613332316164633632663161643731306563
38303661343738393439313866616232393235663762336363396266613332336534643836623732
61643731653864623064343734633163353538626331653638623532653864396564366364626666
33336633346661623030656261323265616536623733346632303662643936333061613462306563
34336335346332393631393933316234366162656139323430323262633737323539663364383439
34313566346162373036623038353432613434393761623532653666323366393661353938353935
33356264323032303338323062366231633135663538333535666663366638636161623832383833
30623838663561383434643131643861656235643539633762656161323931313266376266633162
38613635653463653934336465326436323538366231626135396533363037323662353233643664
65303235373930633833656564666634616434653731346363383933303361306235623132396232
34613762613532326333366437376139373634663433666537383234666132326364616665313561
63316431636432626565363161383538656361346365313437323038353666656631636162363834
63373762306435373938333731333664346466613035646232363332613364373230393862306338
38386365666533383833626266663463663632343930613338376636383132356437356330346237
31326531323634363565393166663861363933373665363032633330303565636136633965383538
38656164663836613766616432353764623265363061333331333132633530656663383164626438
39346361336131373662623332643134636366613932653734363137303065343063616234316464
62396532376265363236333365313739356330323463313337636363613164396261656565356532
37393530303036653862366665353538636338303931366235663232636262373332643638643863
62336234636366313636613963303832346430663137333136373432303762633461363435356666
39636564363166623036363565303563653463366564633361343464333833363030363133623035
31333437366331356461326336653763373633656637346334643363353164623636353933343566
64316165383037636566313936356239333830336366633362633039643361613331643237336439
61333936363365313633343565323966376439653565326431663131396136306631373665386134
66393433623566656331346635666565633436313165663066376333306136336139646537373539
31306337363038333434323830623335643761666361666662303937376237653963383536363038
63366239306163346631303532323935633165383163323035313061643939333561356535636233
62346164333334303864633630616638306432313962653866376637356562623339373937666463
33306266373762353561656331333731653564616633326164343930616139343166323232366536
37366562356635376339346366363761353630633237353730616365356134383037363963613964
31303531633862373035326533656235343562363565366664303662613835393264346365333764
32383362656163366630356637323136356333303062663537353661323433643866663635636335
66616531353937376438386133346465356336663164646130633231366434323036353264633766
39336162623834396636393636396563313664303263333534306564393139313035613635356439
62396465306138353538316430613236333737653437653562393432396234383064343837326433
63663337383332316665393430313435306234636466383862306362366531336463653732323439
39626166313163323334663730376536323066386238336663316339303165616233323462363632
35363562376332336337316539356265613463616435616330626130303139633632336664363863
66663331633965373535613066643233303335663233613532663031356130306131333363393937
34343035373165313864303133366331373466306364313263663865366431353465323034666464
34393835313535386233616337316537623338643330346536303566373537356262343133376537
63396335653033343364353461616666396364616430646566333336383862313635363837626439
39356637653635643165653266633836626539663762303937636135386538343963313836313732
33653666633062623662316662656339383331356139613964636639613438383331646561663731
65656531376535353666323263343666333033316135386632313536303137303730356337656630
33323739616664323734633034666536643433383138306437653161656665643735303463646465
64333762346531326334663434313030373238333832363839373661303631373261336137653231
66393731393131373335626630373564393131633133313761306263303965633330303061643064
39666635646464616264326339623763316333363737653636666631373238366338333336323636
34623237623133633432626463383737613834353631346136333465313833346661663338366234
63333234353632356335383730613961363437306639623437653638353530373864633863663530
33396632386337303931
---
host_name: 'rivendell'
primary_user: 'major'
primary_user_uid: 1000
primary_user_gid: 1001
# Directory for all user binaries and scripts
bin_prefix: '/usr/local/bin'
# Yandex.Cloud Postbox for vakhrushev.me
postbox_host: 'postbox.cloud.yandex.net'
postbox_port: 587
postbox_user: 'YCAJEj7W-Z3r3Bgn3zg_R3UgR'
postbox_pass: 'BCYIJH+OdE6cGx+3+JkBYrrBaokztxQDF5aXmcQ3xFlb'
caddy_vars:
github_token: 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
yandex_disk:
login: anwinged
password: mjcivdhywiilnwbe
netdata:
login: status
password_hash: JDJhJDE0JHNMYy5NdllIQnRhMWtVdDVLZFBQUC5EWDFGZEl6MzV5OVhxVWtabk5FaGh1RzlIZkRNbkE2
# Password for netdata user, used for metric collection
# User created manual with psql
# See: https://learn.netdata.cloud/docs/collecting-metrics/databases/postgresql#create-netdata-user
netdata_postgres_password: 'password'
# Outline
outline_secret_key: ceac84b1f9e279c0f6169a8d61330b29c49ae463085eb68afe6f5adc77cd1ead
outline_utils_secret: 59731321610f9f4c1ad51506644d039b2fdca3bdd68d45b296056b38bff7e27a
outline_postgres_database: outline
outline_postgres_user: outline_user
outline_postgres_password: 95523207c341a6cb2a5682762f76f826
outline_s3_access_key: YCAJE7wiyhy3l4aSDU6u2yBEk
outline_s3_secret_key: YCNhjT67yHGQYY4WUSU5sT_bFj0kEQGTzQsFxKUS
outline_s3_url: 'https://storage.yandexcloud.net'
outline_s3_bucket: 'av-outline-wiki'
outline_s3_region: 'ru-central1'
outline_oidc_client_id: 'outline-app'
outline_oidc_client_secret: 'dRa46aRyz_sYagvRdZ~Gn_.KxmGOncRQ9TWEcN1TllmQe_ze35eXz4ZksbSkPZXPHU2k6mxK'
# Gramps
gramps_secret_key: 'hdphyeVEychYXwC7xQBP6TXgGhaWz0YMdeuvZus8oS8'
gramps_s3_endpoint: 'https://storage.yandexcloud.net'
gramps_s3_access_key_id: 'YCAJE_J9uhmznSeQ0g6ye8jYK'
gramps_s3_secret_access_key: 'YCNWvP85-Qg53r63oCVYRjl4L4sNQy2QzD88L54y'
gramps_s3_region: 'ru-central1'
# Miniflux
miniflux_postgres_user: 'miniflux_user'
miniflux_postgres_password: 'aBDrRh27ce4Impc63jar4qg3GbdKRNck'
miniflux_postgres_database: 'miniflux'
miniflux_admin_user: 'miniadmin'
miniflux_admin_password: 'he56aN4xwUGDXgFhZpqm5NwyRefHjAQK'
miniflux_oidc_client_id: 'miniflux-app'
miniflux_oidc_client_secret: 'rWcxlJSsLr_cqEvm2n3kUv1vqXjQ9ms.S3VUioASuVaMEalIbSPHv5pz6hLwbguwGCE-tkid'
# Wakapi
wakapi_password_salt: "XfcXijRPMZzAAtvHNKdqOkFvUYc0Rf8N"
# Backups
backup_directory: '/var/gobackup'
backup_gobackup_config: '/etc/gobackup/gobackup.yml'
# Restic credentials (for backups)
restic_tag: 'rivendell'
restic_repository: 's3:https://storage.yandexcloud.net/av-backup-restic-rivendell'
restic_password: 'DCbFlbTJHAqa45uK10cZvlh1XNY4X3qu'
restic_s3_access_key: 'YCAJEwvWoiYZkVOKhaKhqihRm'
restic_s3_access_secret: 'YCMkjA3-tsGB5LvHNzj98QD-eSFNqRobGrnU_ypF'
restic_s3_region: 'ru-central1'
# Notifications with Telebram bot
notifications_name: 'rivendell'
notifications_tg_bot_token: '8165653788:AAGTaOe2id2Iq9C9t_jZf5888-6X6cjry7E'
notifications_tg_chat_id: '-1002357198013'