Skip to content

Commit

Permalink
FIX - proxy setup now removes ports def to avoid network mode incompa…
Browse files Browse the repository at this point in the history
…tibility
  • Loading branch information
MRColorR committed Apr 3, 2024
1 parent 42f507c commit 229ff7d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
######################################################################
## PROJECT_VERSION
PROJECT_VERSION=3.4.1
PROJECT_VERSION=3.4.2
## PROJECT NAME
COMPOSE_PROJECT_NAME=money4band
DS_PROJECT_SERVER_URL=https://discord.com/invite/Fq8eeazBAD
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ services:
#ENABLE_MYSTNODE command: service --agreed-terms-and-conditions
#ENABLE_MYSTNODE cap_add:
#ENABLE_MYSTNODE - NET_ADMIN
#ENABLE_MYSTNODE ports:
#ENABLE_MYSTNODE - ${MYSTNODE_DASHBOARD_PORT}:4449
#ENABLE_MYSTNODE ports: #RMLINE_IF_ENABLE_PROXY
#ENABLE_MYSTNODE - ${MYSTNODE_DASHBOARD_PORT}:4449 #RMLINE_IF_ENABLE_PROXY
#ENABLE_MYSTNODE volumes:
#ENABLE_MYSTNODE # You have 2 options
#ENABLE_MYSTNODE - ./.data/mysterium-node:/var/lib/mysterium-node # Bind an host folder to the container (more insecure but simplier to port and backup) this option mount a new identity or a backed up one from the host file system
Expand All @@ -214,8 +214,8 @@ services:
#ENABLE_PEER2PROFIT image: mrcolorrain/peer2profit:latest
#ENABLE_PEER2PROFIT environment:
#ENABLE_PEER2PROFIT - P2P_EMAIL=$PEER2PROFIT_EMAIL
#ENABLE_PEER2PROFIT ports:
#ENABLE_PEER2PROFIT - 5901:5900
#ENABLE_PEER2PROFIT ports: #RMLINE_IF_ENABLE_PROXY
#ENABLE_PEER2PROFIT - 5901:5900 #RMLINE_IF_ENABLE_PROXY
#ENABLE_PEER2PROFIT # network_mode: service:tun2socks
#ENABLE_PEER2PROFIT restart: always
#ENABLE_PEER2PROFIT cpus: ${APP_CPU_LIMIT_HUGE}
Expand Down Expand Up @@ -276,8 +276,8 @@ services:
container_name: ${DEVICE_NAME}_webdashboard
hostname: ${DEVICE_NAME}_webdashboard
image: nginx:alpine-slim
ports:
- ${M4B_DASHBOARD_PORT}:80
ports: #RMLINE_IF_ENABLE_PROXY
- ${M4B_DASHBOARD_PORT}:80 #RMLINE_IF_ENABLE_PROXY
volumes:
- ./.resources/.www:/usr/share/nginx/html:ro
restart: always
Expand Down
6 changes: 5 additions & 1 deletion runme.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,11 @@ function fn_setupProxy() {
} else {
print_and_log "GREEN" "No need to comment out 'hostname:' lines, as they are already commented or absent."
}


# Remove all lines having the comment #RMLINE_IF_ENABLE_PROXY
$dkComContent = $dkComContent -replace '(?m)^.*#RMLINE_IF_ENABLE_PROXY.*\r?\n', ''
Set-Content $script:DKCOM_FILENAME -Value $dkComContent
print_and_log "BLUE" "Service port lines commented out due to proxy configuration to avoid Docker network_mode conflicts. You can still visit these services through the ports published on the proxy service."

# Update the proxy configuration status
$script:PROXY_CONF = $true
Expand Down
4 changes: 4 additions & 0 deletions runme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,10 @@ fn_setupProxy() {
print_and_log "GREEN" "No need to comment out 'hostname:' lines, as they are already commented or absent."
fi

# Remove all lines having the comment #RMLINE_IF_ENABLE_PROXY
sed -i '/#RMLINE_IF_ENABLE_PROXY/d' "$DKCOM_FILENAME"
print_and_log "BLUE" "Service port lines commented out due to proxy configuration to avoid Docker network_mode conflicts. You can still visit these services through the ports published on the proxy service."

# Update the proxy configuration status
PROXY_CONF='true'
sed -i 's/PROXY_CONFIGURATION_STATUS=0/PROXY_CONFIGURATION_STATUS=1/' ${ENV_FILENAME}
Expand Down

0 comments on commit 229ff7d

Please sign in to comment.