Skip to content

Commit 68a89e9

Browse files
authored
Merge pull request #41277 from appsmithorg/release
06/10 Daily Promotion
2 parents b1c6e5c + 336d318 commit 68a89e9

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

deploy/docker/fs/etc/supervisor/supervisord.conf

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ username=%(ENV_APPSMITH_SUPERVISOR_USER)s
1010
password=%(ENV_APPSMITH_SUPERVISOR_PASSWORD)s
1111

1212
[supervisord]
13-
logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
13+
logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/%(ENV_HOSTNAME)s-stdout.log ; (main log file;default $CWD/supervisord.log)
1414
pidfile=%(ENV_TMP)s/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
1515
childlogdir=%(ENV_APPSMITH_LOG_DIR)s/supervisor ; ('AUTO' child log dir, default $TEMP)
1616
stdout_logfile_maxbytes = 0
@@ -35,13 +35,12 @@ serverurl=unix://%(ENV_TMP)s/supervisor.sock ; use a unix:// URL for a unix soc
3535
files = %(ENV_SUPERVISORD_CONF_TARGET)s/*.conf
3636

3737
[eventlistener:stdout]
38+
# This eventlistener sends logs to the python handler in /usr/lib/python3/dist-packages/supervisor/appsmith_supervisor_stdout.py created in this repo
39+
# It sends logs for individual processes to stdout/stderr of the main process, which lets logging pipelines to capture logs from each process.
40+
# Supervisor then wants to send these messages to a logfile by default, so directing them to /dev/null prevents double logging.
3841
command = python3 -m supervisor.appsmith_supervisor_stdout
3942
buffer_size = 10000
4043
events = PROCESS_LOG
4144
result_handler = supervisor.appsmith_supervisor_stdout:event_handler
42-
stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/access-supervisor-%(ENV_HOSTNAME)s.log
43-
stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/error-supervisor-%(ENV_HOSTNAME)s.log
44-
stdout_logfile_maxbytes=10MB
45-
stderr_logfile_maxbytes=10MB
46-
stdout_logfile_backups=10
47-
stderr_logfile_backups=10
45+
stdout_logfile=/dev/null
46+
stderr_logfile=/dev/null

deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const parts = []
4242

4343
parts.push(`
4444
{
45-
debug
4645
admin 0.0.0.0:2019
4746
persist_config off
4847
acme_ca_root /etc/ssl/certs/ca-certificates.crt

scripts/deploy_preview.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,16 @@ kubectl get pods
4949

5050
# Optional cleanup logic
5151
if [[ -n "${RECREATE-}" ]]; then
52-
mongosh "mongodb+srv://$DB_USERNAME:$DB_PASSWORD@$DB_URL/$DBNAME?retryWrites=true&minPoolSize=1&maxPoolSize=10&maxIdleTimeMS=900000&authSource=admin" --eval 'db.dropDatabase()'
52+
echo "Wiping the DP from MongoDB and Kubernetes since the reset flag was set"
5353
pod_name="$(kubectl get pods -n "$NAMESPACE" -o json | jq -r '.items[0].metadata.name')"
54+
# execute this db.dropDatabase() from the k8s cluster because there's network restrictions on Atlas cluster.
55+
# The \$ is used to escape the $ character in the APPSMITH_DB_URL environment variable so it's interpolated inside the kubectl exec command.
56+
kubectl exec "$pod_name" -n "$NAMESPACE" -- bash -c "mongosh \$APPSMITH_DB_URL --eval 'db.dropDatabase()'"
5457
kubectl exec "$pod_name" -n "$NAMESPACE" -- bash -c "rm -rf /appsmith-stacks/*"
5558
kubectl delete ns "$NAMESPACE" || true
5659
kubectl patch pv "$NAMESPACE-appsmith" -p '{"metadata":{"finalizers":null}}' || true
5760
kubectl delete pv "$NAMESPACE-appsmith" --grace-period=0 --force || true
61+
echo "DP wiped from MongoDB and Kubernetes"
5862
fi
5963

6064
# Create namespace and image pull secret

0 commit comments

Comments
 (0)