Add some scripts and fix small issues
This commit is contained in:
		
							parent
							
								
									0e26052058
								
							
						
					
					
						commit
						b286596765
					
				
					 5 changed files with 32 additions and 3 deletions
				
			
		
							
								
								
									
										26
									
								
								_utils/cert-basic.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								_utils/cert-basic.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
#!/usr/bin/env sh
 | 
			
		||||
 | 
			
		||||
LEGO_WORKING_PATH="/opt/services/.lego/"
 | 
			
		||||
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
domain="$1"
 | 
			
		||||
 | 
			
		||||
action="$2" # either "run" or "renew"
 | 
			
		||||
if [ -z "$action" ] || [ -z "$domain" ]; then
 | 
			
		||||
    echo "Usage: $0 <domain> <run|renew>"
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
if [ "$action" != "run" ] && [ "$action" != "renew" ]; then
 | 
			
		||||
    echo "Usage: $0 <domain> <run|renew>"
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
export ACME_DNS_API_BASE="https://acme.serguzim.me/"
 | 
			
		||||
export ACME_DNS_STORAGE_PATH="$LEGO_WORKING_PATH/acme-dns.json"
 | 
			
		||||
 | 
			
		||||
lego -a --email "tobias@msrg.cc" \
 | 
			
		||||
    --path "$LEGO_WORKING_PATH" \
 | 
			
		||||
    --dns "acme-dns" \
 | 
			
		||||
    --domains "$domain" \
 | 
			
		||||
    "$action"
 | 
			
		||||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ GITEA__service__NO_REPLY_ADDRESS="discard.msrg.cc"
 | 
			
		|||
GITEA__webhook__DELIVER_TIMEOUT="60"
 | 
			
		||||
 | 
			
		||||
GITEA__mailer__ENABLED="true"
 | 
			
		||||
GITEA__mailer__PROTOCOL="smtp+startls"
 | 
			
		||||
GITEA__mailer__PROTOCOL="smtp+starttls"
 | 
			
		||||
GITEA__mailer__SMTP_ADDR="mail.serguzim.me"
 | 
			
		||||
GITEA__mailer__SMTP_PORT="587"
 | 
			
		||||
GITEA__mailer__FROM="Gitea <git@serguzim.me>"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,7 @@ version: "3"
 | 
			
		|||
 | 
			
		||||
services:
 | 
			
		||||
  server:
 | 
			
		||||
    image: gitea/gitea:1.18
 | 
			
		||||
    image: gitea/gitea:1.19
 | 
			
		||||
    container_name: gitea
 | 
			
		||||
    labels:
 | 
			
		||||
      com.centurylinklabs.watchtower.enable: true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@ version: '3'
 | 
			
		|||
services:
 | 
			
		||||
 | 
			
		||||
  synapse:
 | 
			
		||||
    image: docker.io/matrixdotorg/synapse:latest
 | 
			
		||||
    image: ghcr.io/matrix-org/synapse
 | 
			
		||||
    restart: always
 | 
			
		||||
    labels:
 | 
			
		||||
      com.centurylinklabs.watchtower.enable: true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								watchtower/run-once.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								watchtower/run-once.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
#!/usr/bin/env sh
 | 
			
		||||
 | 
			
		||||
docker compose run -e WATCHTOWER_RUN_ONCE=true -e WATCHTOWER_NOTIFICATIONS= watchtower
 | 
			
		||||
		Reference in a new issue