Skip to content

Commit c65fb03

Browse files
author
Tristen Harr
committed
update to use bash shell
1 parent 1f2725f commit c65fb03

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ This changelog documents the changes between release versions.
44
## [Unreleased]
55
Changes to be included in the next upcoming release
66

7-
## [0.0.31] - 2024-07-22
8-
* Update workflow to create multi-platform build
7+
## [0.0.32] - 2024-07-29
8+
* Fix scripts and base image to use bash instead of sh
9+
10+
## [0.0.31] - 2024-07-29
11+
* Fix base image to Python 3.11
912

1013
## [0.0.30] - 2024-07-22
1114
* Update workflow to create multi-platform build

Dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
FROM python:3.11
22

3-
COPY /docker /scripts
3+
# Install curl for healthcheck
4+
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
45

6+
COPY /docker /scripts
57
COPY /functions /functions
8+
9+
# Ensure scripts are executable
10+
RUN chmod +x /scripts/package-restore.sh /scripts/start.sh
11+
12+
# Run the package-restore script
613
RUN /scripts/package-restore.sh
714

815
EXPOSE 8080
916

10-
HEALTHCHECK --interval=5s --timeout=10s --start-period=1s --retries=3 CMD [ "sh", "-c", "exec curl -f http://localhost:${HASURA_CONNECTOR_PORT:-8080}/health" ]
17+
HEALTHCHECK --interval=5s --timeout=10s --start-period=1s --retries=3 \
18+
CMD [ "bash", "-c", "exec curl -f http://localhost:${HASURA_CONNECTOR_PORT:-8080}/health" ]
1119

12-
CMD [ "sh", "/scripts/start.sh" ]
20+
CMD [ "/scripts/start.sh" ]

docker/package-restore.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/usr/bin/env sh
2-
set -eu -o pipefail
1+
#!/usr/bin/env bash
2+
set -eu
33

44
cd /functions
55

@@ -13,4 +13,4 @@ then
1313
fi
1414
else
1515
. venv/bin/activate
16-
fi
16+
fi

docker/start.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/usr/bin/env sh
2-
set -eu -o pipefail
1+
#!/usr/bin/env bash
2+
set -eu
33

44
/scripts/package-restore.sh
55

@@ -11,4 +11,4 @@ if [ -f "venv/bin/activate" ]; then
1111
fi
1212

1313
# Run the Python script with the serve command
14-
python3 functions.py serve --configuration ./
14+
exec python3 functions.py serve --configuration ./

0 commit comments

Comments
 (0)