From b043a915c0019a728188288e4edf57c7a14769a6 Mon Sep 17 00:00:00 2001 From: Matt Spencer Date: Fri, 25 Oct 2024 15:12:53 +0100 Subject: [PATCH] Add watchtower http update endpoint --- .../reverseproxy/conf.d/reverse_proxy.conf | 19 ++++++++++++- frontend.yaml | 7 +++++ secrets.enc | 27 ++++++++++--------- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/apptabulous/reverseproxy/conf.d/reverse_proxy.conf b/apptabulous/reverseproxy/conf.d/reverse_proxy.conf index dc9f2b7..ca34f13 100755 --- a/apptabulous/reverseproxy/conf.d/reverse_proxy.conf +++ b/apptabulous/reverseproxy/conf.d/reverse_proxy.conf @@ -36,4 +36,21 @@ server { location / { proxy_pass http://rpi4-2:5000; } -} \ No newline at end of file +} + +# Watchtower +server { + listen 80; + listen [::]:80; + listen 443 ssl; + listen [::]:443 ssl; + + ssl_certificate /etc/letsencrypt/live/apptabulous.co.uk/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/apptabulous.co.uk/privkey.pem; + + server_name watchtower.apptabulous.co.uk; + + location / { + proxy_pass http://rpi4-2:8080; + } +} diff --git a/frontend.yaml b/frontend.yaml index 437cd82..2d8e8bd 100755 --- a/frontend.yaml +++ b/frontend.yaml @@ -19,6 +19,7 @@ - "apptabulous.co.uk" - "www.apptabulous.co.uk" - "hub.apptabulous.co.uk" + - "watchtower.apptabulous.co.uk" - "m5p3nc3r.co.uk" - "www.m5p3nc3r.co.uk" @@ -98,4 +99,10 @@ volumes: - /var/run/docker.sock:/var/run/docker.sock - /home/matt/.docker/config.json:/config.json + command: + - --http-api-update + - --http-api-token={{ secrets.WATCHTOWER_HTTP_API_TOKEN }} + - --http-api-periodic-polls + ports: + - "8080:8080" state: started diff --git a/secrets.enc b/secrets.enc index b90ff13..9c7d8b8 100755 --- a/secrets.enc +++ b/secrets.enc @@ -1,13 +1,16 @@ $ANSIBLE_VAULT;1.1;AES256 -32356336356663633939323233653939386634633761383436386239333164326633323136353261 -3239336138343537633565393662396436613734333337390a623762333164633839333937613233 -35356465356136663531376462643932303830623134616531303634383039356563633464633365 -6237323132343531330a643533323934353231363036343264303339393837366635316634623832 -61626163356637313134616364316237363232616631323137333037636362373038323966336237 -37373134393733396466393130356235316433323762313836633831306135666538316634363537 -61363466623337333430323435303565386533613236336134646663643534343036316431366430 -61323733653835303764653739643662666532333335363738393438623766343363366533666262 -61616531373663646332323166333530613733363461656538376539663736643562343338396637 -37633863356566633264636436363631613666333533313063386465323630396662303764643836 -38636537336230323831386231383039373336666435373538666462656531613637643465323035 -30633135613162393835 +38363434366431613263663039613839383462333538353232663862626135386266373462646564 +3161626434396435383362363461376164653838636338330a613336343662616634656163373363 +38306537333637386663633438396135353862666465386463653935376530633166316363336337 +6666653462343462320a323532626435303633303139643463613535336534653233386630373462 +39663335636434376239626165303832343266346164396436393862396434303133326535383333 +32643439306661386333626138333166313037666366376337356666303832653232623663653563 +36326534323335636630376138333966656566323539356166303466396564346161346436333336 +31393664313539616633616666616265636638623335613262346465313136366134346165316561 +33333039373439656634303438326466623338343534363963333965316362626634383232653036 +65383939383239613530336634613566363039356334626661303333643932613666383661343766 +65323237356631623739383962633266663566393366663132313031363665306361376461366333 +38646134336362376266333434626637646530633064366236326565323266343636636236646533 +34316239643562336634613131363862393536353032366631643439376433393062396531316231 +35363338306135613863326261396566663765353430646562653364373733656438343935353662 +303563616564613837326236666139643835