From de0c724112b4f0a982677585bdfce57238202627 Mon Sep 17 00:00:00 2001 From: Elm Date: Thu, 5 Mar 2026 08:39:54 -0600 Subject: [PATCH] Build on server instead of locally to fix ICU library mismatch The binary was being built locally on Arch (with ICU 78) and then deployed to Debian, causing shared library errors. Now the deployment installs Bun on the server and builds the binary there, ensuring compatibility with the target system's libraries. --- ansible/deploy.yml | 51 ++++++++++++++++++++++++++++++++++++++++----- bun.lockb | Bin 29669 -> 30317 bytes justfile | 2 +- 3 files changed, 47 insertions(+), 6 deletions(-) mode change 100644 => 100755 bun.lockb diff --git a/ansible/deploy.yml b/ansible/deploy.yml index 19b848b..9b4626a 100644 --- a/ansible/deploy.yml +++ b/ansible/deploy.yml @@ -28,13 +28,54 @@ owner: "{{ app_user }}" group: "{{ app_user }}" - - name: Copy binary to target location - copy: - src: ../target/sepiatones_xyz - dest: "{{ app_home }}/sepiatones_xyz" + - name: Install Bun + shell: curl -fsSL https://bun.sh/install | bash + args: + creates: /home/{{ app_user }}/.bun/bin/bun + become_user: "{{ app_user }}" + + - name: Create source directory + file: + path: "{{ app_home }}/src" + state: directory owner: "{{ app_user }}" group: "{{ app_user }}" - mode: "0755" + + - name: Copy package.json + copy: + src: ../package.json + dest: "{{ app_home }}/package.json" + owner: "{{ app_user }}" + group: "{{ app_user }}" + + - name: Copy bun.lockb + copy: + src: ../bun.lockb + dest: "{{ app_home }}/bun.lockb" + owner: "{{ app_user }}" + group: "{{ app_user }}" + + - name: Copy source files + synchronize: + src: ../src/ + dest: "{{ app_home }}/src/" + recursive: yes + owner: no + group: no + archive: yes + delete: yes + + - name: Install dependencies + shell: /home/{{ app_user }}/.bun/bin/bun install --frozen-lockfile + args: + chdir: "{{ app_home }}" + become_user: "{{ app_user }}" + + - name: Build binary + shell: /home/{{ app_user }}/.bun/bin/bun build --compile --minify --target bun --outfile ./sepiatones_xyz ./src/index.tsx + args: + chdir: "{{ app_home }}" + become_user: "{{ app_user }}" - name: Copy data directory synchronize: diff --git a/bun.lockb b/bun.lockb old mode 100644 new mode 100755 index 8cd5f52420217f158b2ebed7df14e6f96b33239b..65b97603d0e4cfc7d2d7f995b8468c5e2f5e6176 GIT binary patch delta 1261 zcmY*YJ8#oa6pr0GcKk@3*h$O+5v@{-N2x`mrczZE1yq(M=>up%rKwQCNYK)!I-w%* z1E|i@(W3{3miz_=_DZlIWhf#83|*Nx_a5g_OJCx9?>XOh&UdbV{TBZI5kB1z299nH zi9h#_>P0bLKRs|Icqb_kNVXKiM~1E3IJ705uPpG4ad6{h9@B_ZOdL+taR}oS69-Sj zjA$kDd{@>D#x}ry@QK5kGy)Bo@)gb+%Ea1|Z75BYprAP5PM9#Ql(@D?DvAyz;}+L% zDU?3|o`O{+NJAtEtek5kx*Awjn4lU5IafPc3DlKJXSDKFV!Ix(6**g=IzkL{D}!ts z#t-*+*L#fw7#iv(qt+{MHigX_Ovp1T z-DU%0nkWrwNaQxV$!HWwG|eJgf@CLxjisH`N%Ta;VpH82;T-)`bj11yQ#w~}r8?Pc zjIK!uq~@D_T%k$QtoXLsYo?I4`?^f`OQd^Itxgm#D|2~t2{Idr{Y?K*!e}Ma70dKh z<66u<&x$6)SVOB@J2u<4sN8~0J~nLT@RmKpT({9@EpiW4-7F`|ZgR(iEPC6ya#@yj zk*)A6iB|cmKBp|%=~hF%ul)W;}vsA3l+NyHC0 zZp5IW{@pU}25=|ySSw->1wKTo;3*CXLxoPTcc7tIu&(4t2=)}84DjSkZj^n(}E-bc3G2=qQf{x&=#m4r5#Tc{t#!8KVl@ zhC_^=jy2Puq)$I<8eJ(&V$-ysW#*tvPjSh^Q46xs+@TxW(JXYL4kls7(3+S-C@20B zS1nDFX3P za;WrO5>uthS}F_qlnb+(2h9}vlVT<8i5X6#L+K^%)^@t@Wm??NyFzN1KmW|NV266} z8BbY(g+w>gONX^xIb(F$H!^w7+QIn$#>)=0nx|ea{vGU diff --git a/justfile b/justfile index 9c24bd9..531b930 100644 --- a/justfile +++ b/justfile @@ -7,7 +7,7 @@ dev: build: bun build --compile --minify --target bun --outfile ./target/sepiatones_xyz ./src/index.tsx -deploy: build +deploy: ansible-playbook -i ansible/hosts.ini ansible/deploy.yml test: