Skip to content

Commit eda2240

Browse files
committed
Merge branch 'development' of github.com:hotosm/fmtm into fix/offline-bugs
2 parents 563f190 + 1f18fcb commit eda2240

File tree

8 files changed

+30
-21
lines changed

8 files changed

+30
-21
lines changed

compose.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,6 @@ services:
346346
fmtm-db:
347347
# Temp workaround until https://github.com/postgis/docker-postgis/issues/216
348348
image: "ghcr.io/hotosm/postgis:${POSTGIS_TAG:-14-3.5-alpine}"
349-
command: -c 'wal_level=logical'
350349
volumes:
351350
- fmtm_db_data:/var/lib/postgresql/data/
352351
environment:
@@ -358,6 +357,7 @@ services:
358357
networks:
359358
- fmtm-net
360359
restart: "unless-stopped"
360+
command: -c 'max_connections=300' -c 'wal_level=logical'
361361
healthcheck:
362362
test: pg_isready -U ${FMTM_DB_USER:-fmtm} -d ${FMTM_DB_NAME:-fmtm}
363363
start_period: 5s
@@ -388,7 +388,6 @@ services:
388388
central-db:
389389
profiles: ["", "central"]
390390
image: "ghcr.io/hotosm/postgis:${POSTGIS_TAG:-14-3.5-alpine}"
391-
command: -c 'max_connections=300' -c 'wal_level=logical'
392391
volumes:
393392
- central_db_data:/var/lib/postgresql/data/
394393
environment:
@@ -400,6 +399,8 @@ services:
400399
networks:
401400
- fmtm-net
402401
restart: "unless-stopped"
402+
# Not really required during local dev - enable if testing issues
403+
# command: -c 'max_connections=300'
403404
healthcheck:
404405
test: pg_isready -U ${CENTRAL_DB_USER:-odk} -d ${CENTRAL_DB_NAME:-odk}
405406
start_period: 5s

deploy/gen-and-deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ gen_current_env() {
3434
done < <(grep -vE '^\s*#|^\s*$' .env)
3535
fi
3636

37-
# Generate compose file (note this is currently only for development branch)
38-
export GIT_BRANCH=development
37+
# Generate compose file (default development, but can be overridden)
38+
export GIT_BRANCH="${GIT_BRANCH:-development}"
3939
echo ""
4040
echo "Generated compose file:"
4141
echo ""

src/backend/app-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ wait_for_db() {
88

99
for ((i = 0; i < max_retries; i++)); do
1010
if </dev/tcp/"${FMTM_DB_HOST:-fmtm-db}"/5432; then
11-
echo "Database is available."
11+
echo "Database is available."
1212
return 0 # Database is available, exit successfully
1313
fi
1414
echo "Database is not yet available. Retrying in ${retry_interval} seconds..."
@@ -23,6 +23,9 @@ wait_for_s3() {
2323
max_retries=10
2424
retry_interval=5
2525

26+
# First wait a few seconds for Minio
27+
sleep 5
28+
echo "Testing S3 connection to ${S3_ENDPOINT}"
2629
for ((i = 0; i < max_retries; i++)); do
2730
http_status=$(curl --silent --head --write-out "%{http_code}" --output /dev/null "${S3_ENDPOINT}/minio/health/live")
2831

src/backend/backup-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ wait_for_db() {
6565

6666
for ((i = 0; i < max_retries; i++)); do
6767
if </dev/tcp/"${db_host}"/5432; then
68-
echo "Database is available."
68+
echo "Database is available."
6969
return 0 # Database is available, exit successfully
7070
fi
7171
echo "Database is not yet available. Retrying in ${retry_interval} seconds..."
@@ -80,6 +80,9 @@ wait_for_s3() {
8080
max_retries=10
8181
retry_interval=5
8282

83+
# First wait a few seconds for Minio
84+
sleep 5
85+
echo "Testing S3 connection to ${S3_ENDPOINT}"
8386
for ((i = 0; i < max_retries; i++)); do
8487
http_status=$(curl --silent --head --write-out "%{http_code}" --output /dev/null "${S3_ENDPOINT}/minio/health/live")
8588

src/backend/migrate-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ wait_for_db() {
8181

8282
for ((i = 0; i < max_retries; i++)); do
8383
if </dev/tcp/"${FMTM_DB_HOST:-fmtm-db}"/5432; then
84-
echo "Database is available."
84+
echo "Database is available."
8585
return 0 # Database is available, exit successfully
8686
fi
8787
echo "Database is not yet available. Retrying in ${retry_interval} seconds..."
@@ -96,6 +96,9 @@ wait_for_s3() {
9696
max_retries=10
9797
retry_interval=5
9898

99+
# First wait a few seconds for Minio
100+
sleep 5
101+
echo "Testing S3 connection to ${S3_ENDPOINT}"
99102
for ((i = 0; i < max_retries; i++)); do
100103
http_status=$(curl --silent --head --write-out "%{http_code}" --output /dev/null "${S3_ENDPOINT}/minio/health/live")
101104

src/backend/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies = [
3434
"pydantic-settings==2.6.0",
3535
"geojson-pydantic==1.1.2",
3636
"python-multipart==0.0.12",
37-
"psycopg[pool]>=3.2.3",
37+
"psycopg[pool]==3.2.3",
3838
"geojson==3.1.0",
3939
"shapely==2.0.6",
4040
"pyxform==2.1.1",
@@ -45,14 +45,14 @@ dependencies = [
4545
"sozipfile==0.3.2",
4646
"cryptography==43.0.3",
4747
"pyjwt==2.9.0",
48+
"aiosmtplib==4.0.1",
49+
"markdown==3.8",
4850
"osm-fieldwork",
4951
"osm-login-python==2.0.0",
5052
"osm-rawdata==0.4.2",
5153
"fmtm-splitter==2.0.0",
5254
"pg-nearest-city==0.2.1",
5355
"pyodk",
54-
"aiosmtplib>=4.0.1",
55-
"markdown>=3.8",
5656
]
5757
readme = "../../README.md"
5858
license = {text = "AGPL-3.0-only"}

src/backend/uv.lock

Lines changed: 9 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mapper/src/lib/components/forms/wrapper.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
style:height="100%"
255255
use:handleIframe
256256
title="odk-web-forms-wrapper"
257-
src={`./web-forms.html?projectId=${projectId}&entityId=${entityId}&formXml=${formXml}&odkWebFormUrl=${odkWebFormUrl}&formMedia=${encodeURIComponent(JSON.stringify(formMedia))}&cssFile=${commonStore.config?.cssFileWebformsOverride || ''}`}
257+
src={`/web-forms.html?projectId=${projectId}&entityId=${entityId}&formXml=${formXml}&odkWebFormUrl=${odkWebFormUrl}&formMedia=${encodeURIComponent(JSON.stringify(formMedia))}&cssFile=${commonStore.config?.cssFileWebformsOverride || ''}`}
258258
></iframe>
259259
{/if}
260260
{/key}

0 commit comments

Comments
 (0)