Skip to content

Commit

Permalink
Merge pull request #250 from OpenHistoricalMap/staging
Browse files Browse the repository at this point in the history
CGIMAP and Apache liveness Probe
  • Loading branch information
Ruben L. Mendoza authored Dec 4, 2023
2 parents 67540b4 + 12fc2e1 commit 67a7657
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions images/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,6 @@ RUN chown -R www-data: $workdir
ADD config/settings.yml $workdir/config/

COPY start.sh $workdir/
COPY liveness.sh $workdir/

CMD $workdir/start.sh
26 changes: 26 additions & 0 deletions images/web/liveness.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# This is a script for the complex evaluation of whether Apache or other processes are running in the container.
check_process() {
if ps aux | grep "$1" | grep -v grep > /dev/null; then
return 0
else
return 1
fi
}

# Check for openstreetmap-cgimap process
check_process "/usr/local/bin/openstreetmap-cgimap"
cgimap_status=$?

# Check for apache2 process
check_process "apache2"
apache_status=$?

# Evaluate results
if [ $cgimap_status -eq 0 ] && [ $apache_status -eq 0 ]; then
echo "Both openstreetmap-cgimap and apache2 are running."
exit 0
else
echo "One or both processes are not running!" 1>&2
exit 1
fi
2 changes: 1 addition & 1 deletion ohm/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: osm-seed
version: '0.1.0-n815.hccedaed'
version: '0.1.0-n816.ha1443d4'
repository: https://devseed.com/osm-seed-chart/
2 changes: 1 addition & 1 deletion values.production.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ osm-seed:
maxReplicas: 10
cpuUtilization: 80
sharedMemorySize: 512Mi

livenessProbeExec: true
# ====================================================================================================
# Variables for memcached. Memcached is used to store session cookies
# ====================================================================================================
Expand Down
1 change: 1 addition & 0 deletions values.staging.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ osm-seed:
memory: "10Gi"
cpu: "5"
sharedMemorySize: 256Mi
livenessProbeExec: true
# ====================================================================================================
# Variables for osm-seed website
# ====================================================================================================
Expand Down

0 comments on commit 67a7657

Please sign in to comment.