Compare commits

...

3 Commits

Author SHA1 Message Date
e175418148
add a settings.json for vscode 2023-04-06 15:08:59 -04:00
ec8afae4ab
Fix bug in nginx.conf. 2023-04-06 15:08:34 -04:00
dd33c34710
Create relative symlinks. 2023-04-06 11:13:51 -04:00
4 changed files with 48 additions and 8 deletions

37
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,37 @@
{
"editor.renderWhitespace": "boundary",
"editor.tabSize": 4,
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"editor.cursorBlinking": "phase",
"editor.cursorWidth": 3,
"editor.formatOnSave": true,
"shellcheck.enable": true,
"shellcheck.enableQuickFix": true,
"shellcheck.run": "onType",
"shellcheck.executablePath": "shellcheck",
"shellcheck.customArgs": [
"-x"
],
"shellcheck.ignorePatterns": {},
// "shellcheck.exclude": [
// "SC1090",
// "SC1091",
// "SC2029"
// ],
"terminal.integrated.fontFamily": "monospace",
"workbench.colorCustomizations": {
"activityBar.background": "#1900a565",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#7143fc",
"activityBarBadge.foreground": "#e7e7e7",
"titleBar.activeBackground": "#029727",
"titleBar.inactiveBackground": "#02972799",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveForeground": "#e7e7e799",
"statusBar.background": "#f3ad43",
"statusBarItem.hoverBackground": "#ffbc59",
"statusBar.foreground": "#000000"
}
}

View File

@ -35,6 +35,7 @@ if lxc remote get-default | grep -q "production"; then
fi fi
PRIMARY_DOMAIN=
RUN_CERT_RENEWAL=true RUN_CERT_RENEWAL=true
SKIP_WWW=false SKIP_WWW=false
RESTORE_WWW=false RESTORE_WWW=false
@ -178,8 +179,9 @@ function stub_site_definition {
mkdir -p "$SITE_PATH" "$PROJECT_PATH/sites" mkdir -p "$SITE_PATH" "$PROJECT_PATH/sites"
# create a symlink from the PROJECT_PATH/sites/DOMAIN_NAME to the ss-sites/domain name # create a symlink from the PROJECT_PATH/sites/DOMAIN_NAME to the ss-sites/domain name
if [ ! -d "$PROJECT_PATH/sites/$DOMAIN_NAME" ]; then DOMAIN_SYMLINK_PATH="$PROJECT_PATH/sites/$DOMAIN_NAME"
ln -s "$SITE_PATH" "$PROJECT_PATH/sites/$DOMAIN_NAME" if [ ! -L "$DOMAIN_SYMLINK_PATH" ]; then
ln -r -s "$SITE_PATH" "$DOMAIN_SYMLINK_PATH"
fi fi
if [ ! -f "$SITE_PATH/site.conf" ]; then if [ ! -f "$SITE_PATH/site.conf" ]; then
@ -226,8 +228,9 @@ export PROJECT_PATH="$PROJECTS_PATH/$PROJECT_NAME"
mkdir -p "$PROJECT_PATH" "$REMOTE_PATH/projects" mkdir -p "$PROJECT_PATH" "$REMOTE_PATH/projects"
# create a symlink from ./remotepath/projects/project # create a symlink from ./remotepath/projects/project
if [ ! -d "$REMOTE_PATH/projects/$PROJECT_NAME" ]; then PROJECT_SYMLINK="$REMOTE_PATH/projects/$PROJECT_NAME"
ln -s "$PROJECT_PATH" "$REMOTE_PATH/projects/$PROJECT_NAME" if [ ! -L "$PROJECT_SYMLINK" ]; then
ln -r -s "$PROJECT_PATH" "$PROJECT_SYMLINK"
fi fi
# check to see if the enf file exists. exist if not. # check to see if the enf file exists. exist if not.
@ -288,7 +291,7 @@ export DOMAIN_COUNT=$(("$(echo "$DOMAIN_LIST" | tr -cd , | wc -c)"+1))
# let's provision our primary domain first. # let's provision our primary domain first.
export DOMAIN_NAME="$PRIMARY_DOMAIN" export DOMAIN_NAME="$PRIMARY_DOMAIN"
export PRIMARY_DOMAIN="$PRIMARY_DOMAIN"
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
export PRIMARY_WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME" export PRIMARY_WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME"

View File

@ -53,5 +53,5 @@ done
if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then
docker stack rm reverse-proxy docker stack rm reverse-proxy
sleep 5 sleep 10
fi fi

View File

@ -269,8 +269,8 @@ EOL
# Route everything to the real BTCPay server # Route everything to the real BTCPay server
location / { location / {
# URL of BTCPay Server # URL of BTCPay Server on the ss-ovn logical network
proxy_pass http://$LXD_VM_NAME.lxd:80; proxy_pass http://${BTCPAY_HOSTNAME}-${PRIMARY_DOMAIN//./-}.lxd:80;
proxy_set_header Host \$http_host; proxy_set_header Host \$http_host;
proxy_set_header X-Forwarded-Proto \$scheme; proxy_set_header X-Forwarded-Proto \$scheme;
proxy_set_header X-Real-IP \$remote_addr; proxy_set_header X-Real-IP \$remote_addr;