Skip to content

Commit

Permalink
add full CF
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed Mar 10, 2024
1 parent d6a5b05 commit b883c0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ doas podman run --name ii -p 80:80 -p 443:443 -it monius/docker-instant-ai /bin/
doas podman run -itd \
--name instant-ai \
-e DOMAIN=domain \
-e CLOUDFLARE_DNS_API_TOKEN=cf_api_token \
-e CF_Token=cf_api_token \
-e CF_Zone_ID=cf_zone_id \
-e CF_Account_ID=cf_acc_id \
-e AI_SERVICE_NAME=ai_name \
-e AI_SERVICE_PORT=ai_port \
-p 80:80 \
Expand Down
8 changes: 6 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

sleep 3

NG_ACME=~/acme.sh
NG_ACME=~/.acme/acme.sh
NG_SSL=/etc/nginx/ssl
NG_CONF=/etc/nginx/nginx.conf
NG_DEBUG=/etc/nginx/service.d/default
Expand Down Expand Up @@ -178,9 +178,13 @@ EOF

if [ ! -d $NG_SSL ] && [ -e $NG_ACME ]; then
mkdir -p $NG_SSL

$NG_ACME --issue -d "$DOMAIN" -d "$AI_SERVICE_NAME.$DOMAIN" --dns dns_cf

$NG_ACME --install-cert -d "$DOMAIN" \
--key-file "$SSL_KEY" \
--fullchain-file "$SSL_FULL_CHAIN"
--fullchain-file "$SSL_FULL_CHAIN" \
--dns dns_cf
fi

if [ ! -e $NG_CONF ]; then
Expand Down

0 comments on commit b883c0e

Please sign in to comment.