Skip to content

Commit 756249f

Browse files
MAV-934: Update configuration
- Ensure possible health-check - Port to align with exposed port
1 parent 74638dc commit 756249f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,6 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
8383
# Start server via Thruster by default, this can be overwritten by envionment variable
8484
EXPOSE 4000
8585
ENV HTTP_PORT=4000
86+
ENV GOOD_JOB_PROBE_PORT=4000
8687
ENV SERVER_TYPE=thrust
8788
CMD ["./bin/start.sh"]

bin/start.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
#!/usr/bin/env bash
22

33
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
4-
cd "$SCRIPT_DIR" || { echo "Failed to change directory to $SCRIPT_DIR"; exit 1; }
54

65
if [ "$SERVER_TYPE" == "thrust" ]; then
76
echo "Starting Thrust server..."
8-
./thrust ./rails server
7+
exec "$SCRIPT_DIR"/thrust "$SCRIPT_DIR"/rails server
98
elif [ "$SERVER_TYPE" == "background" ]; then
109
echo "Starting background server..."
11-
./bundle exec good_job start
10+
exec "$SCRIPT_DIR"/bundle exec good_job start
1211
else
1312
echo "SERVER_TYPE variable: '$SERVER_TYPE' unknown. Allowed values ['thrust','background']"
14-
cd - && exit 1
13+
exit 1
1514
fi
16-
cd - || return 2

0 commit comments

Comments
 (0)