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.
This commit is contained in:
parent
28b94a096a
commit
de0c724112
3 changed files with 47 additions and 6 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue