Skip to content

Commit cc49a2c

Browse files
authored
[INFRA-219] fix: update Dockerfile and docker-compose for proxy service (#7523)
* fix: update Dockerfile and docker-compose for version v0.28.0 and improve curl commands in install script * fix: update docker-compose to use 'stable' tag for all services * fix: improve curl command options in install script for better reliability
1 parent ee53ee3 commit cc49a2c

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

apps/proxy/Dockerfile.ce

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN xcaddy build \
55
--with github.com/caddy-dns/digitalocean@04bde2867106aa1b44c2f9da41a285fa02e629c5 \
66
--with github.com/mholt/caddy-l4@4d3c80e89c5f80438a3e048a410d5543ff5fb9f4
77

8-
FROM caddy:2.10.0-builder-alpine
8+
FROM caddy:2.10.0-alpine
99

1010
RUN apk add --no-cache nss-tools bash curl
1111

deployments/cli/community/docker-compose.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,15 +216,6 @@ services:
216216
# Comment this if you already have a reverse proxy running
217217
proxy:
218218
image: artifacts.plane.so/makeplane/plane-proxy:${APP_RELEASE:-stable}
219-
command:
220-
[
221-
"caddy",
222-
"run",
223-
"--config",
224-
"/etc/caddy/Caddyfile",
225-
"--adapter",
226-
"caddyfile",
227-
]
228219
deploy:
229220
replicas: 1
230221
restart_policy:

deployments/cli/community/install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function spinner() {
5757

5858
function checkLatestRelease(){
5959
echo "Checking for the latest release..." >&2
60-
local latest_release=$(curl -s https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name": "[^"]*"' | sed 's/"tag_name": "//;s/"//g')
60+
local latest_release=$(curl -sSL https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name": "[^"]*"' | sed 's/"tag_name": "//;s/"//g')
6161
if [ -z "$latest_release" ]; then
6262
echo "Failed to check for the latest release. Exiting..." >&2
6363
exit 1
@@ -247,15 +247,15 @@ function download() {
247247
mv $PLANE_INSTALL_DIR/docker-compose.yaml $PLANE_INSTALL_DIR/archive/$TS.docker-compose.yaml
248248
fi
249249

250-
RESPONSE=$(curl -H 'Cache-Control: no-cache, no-store' -s -w "HTTPSTATUS:%{http_code}" "$RELEASE_DOWNLOAD_URL/$APP_RELEASE/docker-compose.yml?$(date +%s)")
250+
RESPONSE=$(curl -sSL -H 'Cache-Control: no-cache, no-store' -w "HTTPSTATUS:%{http_code}" "$RELEASE_DOWNLOAD_URL/$APP_RELEASE/docker-compose.yml?$(date +%s)")
251251
BODY=$(echo "$RESPONSE" | sed -e 's/HTTPSTATUS\:.*//g')
252252
STATUS=$(echo "$RESPONSE" | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
253253

254254
if [ "$STATUS" -eq 200 ]; then
255255
echo "$BODY" > $PLANE_INSTALL_DIR/docker-compose.yaml
256256
else
257257
# Fallback to download from the raw github url
258-
RESPONSE=$(curl -H 'Cache-Control: no-cache, no-store' -s -w "HTTPSTATUS:%{http_code}" "$FALLBACK_DOWNLOAD_URL/docker-compose.yml?$(date +%s)")
258+
RESPONSE=$(curl -sSL -H 'Cache-Control: no-cache, no-store' -w "HTTPSTATUS:%{http_code}" "$FALLBACK_DOWNLOAD_URL/docker-compose.yml?$(date +%s)")
259259
BODY=$(echo "$RESPONSE" | sed -e 's/HTTPSTATUS\:.*//g')
260260
STATUS=$(echo "$RESPONSE" | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
261261

@@ -269,15 +269,15 @@ function download() {
269269
fi
270270
fi
271271

272-
RESPONSE=$(curl -H 'Cache-Control: no-cache, no-store' -s -w "HTTPSTATUS:%{http_code}" "$RELEASE_DOWNLOAD_URL/$APP_RELEASE/variables.env?$(date +%s)")
272+
RESPONSE=$(curl -sSL -H 'Cache-Control: no-cache, no-store' -w "HTTPSTATUS:%{http_code}" "$RELEASE_DOWNLOAD_URL/$APP_RELEASE/variables.env?$(date +%s)")
273273
BODY=$(echo "$RESPONSE" | sed -e 's/HTTPSTATUS\:.*//g')
274274
STATUS=$(echo "$RESPONSE" | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
275275

276276
if [ "$STATUS" -eq 200 ]; then
277277
echo "$BODY" > $PLANE_INSTALL_DIR/variables-upgrade.env
278278
else
279279
# Fallback to download from the raw github url
280-
RESPONSE=$(curl -H 'Cache-Control: no-cache, no-store' -s -w "HTTPSTATUS:%{http_code}" "$FALLBACK_DOWNLOAD_URL/variables.env?$(date +%s)")
280+
RESPONSE=$(curl -sSL -H 'Cache-Control: no-cache, no-store' -w "HTTPSTATUS:%{http_code}" "$FALLBACK_DOWNLOAD_URL/variables.env?$(date +%s)")
281281
BODY=$(echo "$RESPONSE" | sed -e 's/HTTPSTATUS\:.*//g')
282282
STATUS=$(echo "$RESPONSE" | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
283283

0 commit comments

Comments
 (0)