File tree 1 file changed +8
-32
lines changed
1 file changed +8
-32
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -euo pipefail
3
3
4
- # Determine the architecture of the host machine
5
- ARCH=$( uname -m)
6
-
7
- # Set Rust linker for ARM64 if needed
8
- if [ " $ARCH " = " aarch64" ]; then
9
- export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
10
- export RUSTFLAGS=" -C link-arg=-L/usr/lib/aarch64-linux-gnu"
11
- fi
12
-
13
- # Select the binary based on the architecture
14
- if [ " $ARCH " = " x86_64" ]; then
15
- echo " Executing AMD64 binary"
16
- exec /app/refactor_platform_rs \
17
- -l " $BACKEND_LOG_FILTER_LEVEL " \
18
- -i " $BACKEND_INTERFACE " \
19
- -p " $BACKEND_PORT " \
20
- -d " $DATABASE_URL " \
21
- --allowed-origins=" $BACKEND_ALLOWED_ORIGINS " \
22
- " $@ "
23
- elif [ " $ARCH " = " aarch64" ]; then
24
- echo " Executing ARM64 binary"
25
- exec /app/refactor_platform_rs_arm64 \
26
- -l " $BACKEND_LOG_FILTER_LEVEL " \
27
- -i " $BACKEND_INTERFACE " \
28
- -p " $BACKEND_PORT " \
29
- -d " $DATABASE_URL " \
30
- --allowed-origins=" $BACKEND_ALLOWED_ORIGINS " \
31
- " $@ "
32
- else
33
- echo " Unsupported architecture: $( uname -m) " >&2
34
- exit 1
35
- fi
4
+ # Start the main Rust binary with runtime args/envs
5
+ exec /app/refactor_platform_rs \
6
+ -l " $BACKEND_LOG_FILTER_LEVEL " \
7
+ -i " $BACKEND_INTERFACE " \
8
+ -p " $BACKEND_PORT " \
9
+ -d " $DATABASE_URL " \
10
+ --allowed-origins=" $BACKEND_ALLOWED_ORIGINS " \
11
+ " $@ "
You can’t perform that action at this time.
0 commit comments