Skip to content

Commit

Permalink
removing CONFIG_PATH env var
Browse files Browse the repository at this point in the history
  • Loading branch information
dddpt committed Apr 10, 2024
1 parent 442f130 commit f5702e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,3 @@ DEBUG_DEBUGPY_APP_PORT=5678
# Debugpy port used for the `worker_wrapper` service
# DEFAULT: 5679
DEBUG_DEBUGPY_WORKER_WRAPPER_PORT=5679

# Path to the nginx, letsencrypt, etc configuration files, used by script in `./scripts/`.
# DEFAULT: ./conf
CONFIG_PATH=./
2 changes: 1 addition & 1 deletion scripts/check_envvars.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash -e

python3 scripts/check_envvars.py .env.example --docker-compose-dir . --ignored-varnames CONFIG_PATH DEBUG_DEBUGPY_APP_PORT DEBUG_DEBUGPY_WORKER_WRAPPER_PORT
python3 scripts/check_envvars.py .env.example --docker-compose-dir . --ignored-varnames DEBUG_DEBUGPY_APP_PORT DEBUG_DEBUGPY_WORKER_WRAPPER_PORT
12 changes: 6 additions & 6 deletions scripts/init_letsencrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ set -o allexport
source .env
set +o allexport

CONFIG_PATH="${CONFIG_PATH:-'./'}"
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

if [ ! -e "${CONFIG_PATH}/docker-nginx/options-ssl-nginx.conf" ] || [ ! -e "${CONFIG_PATH}/docker-nginx/ssl-dhparams.pem" ]; then
if [ ! -e "${SCRIPT_DIR}/../docker-nginx/options-ssl-nginx.conf" ] || [ ! -e "${SCRIPT_DIR}/../docker-nginx/ssl-dhparams.pem" ]; then
echo "### Downloading recommended TLS parameters ..."
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf > "${CONFIG_PATH}/docker-nginx/options-ssl-nginx.conf"
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot/certbot/ssl-dhparams.pem > "${CONFIG_PATH}/docker-nginx/ssl-dhparams.pem"
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf > "${SCRIPT_DIR}/../docker-nginx/options-ssl-nginx.conf"
curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot/certbot/ssl-dhparams.pem > "${SCRIPT_DIR}/../docker-nginx/ssl-dhparams.pem"
echo
fi

Expand All @@ -34,8 +34,8 @@ docker compose run --rm --entrypoint "\
echo

echo "### Copy the certificate and key to their final destination ..."
cp ${CONFIG_PATH}/conf/certbot/conf/live/${QFIELDCLOUD_HOST}/fullchain.pem ${CONFIG_PATH}/docker-nginx/certs/${QFIELDCLOUD_HOST}.pem
cp ${CONFIG_PATH}/conf/certbot/conf/live/${QFIELDCLOUD_HOST}/privkey.pem ${CONFIG_PATH}/docker-nginx/certs/${QFIELDCLOUD_HOST}-key.pem
cp ${SCRIPT_DIR}/../conf/certbot/conf/live/${QFIELDCLOUD_HOST}/fullchain.pem ${SCRIPT_DIR}/../docker-nginx/certs/${QFIELDCLOUD_HOST}.pem
cp ${SCRIPT_DIR}/../conf/certbot/conf/live/${QFIELDCLOUD_HOST}/privkey.pem ${SCRIPT_DIR}/../docker-nginx/certs/${QFIELDCLOUD_HOST}-key.pem
echo

echo "### Reloading nginx ..."
Expand Down

0 comments on commit f5702e0

Please sign in to comment.