~starkingdoms/starkingdoms

4a51a4cdd0967e8bc0e73525565a3ee106dc67a5 — core 1 year, 8 months ago c3fe42c
client image builds
9 files changed, 21 insertions(+), 164 deletions(-)

M .woodpecker/.client.yaml
D ansible/deploy.yml
D ansible/deploy_backplane.yml
D ansible/environments/beta.yml
D ansible/environments/stable.yml
D ansible/environments/unstable.yml
D ansible/global/backplane.yml
M docker/Dockerfile.build_env
A starkingdoms-client/Dockerfile
M .woodpecker/.client.yaml => .woodpecker/.client.yaml +14 -4
@@ 1,17 1,27 @@
steps:
  - name: client_fmt
    image: node
    image: node:21-alpine
    commands:
      - cd starkingdoms-client
      - yarn
      - yarn prettier . --check

  - name: client_build
    depends_on:
      - client_fmt
    image: node
    image: node:21-alpine
    commands:
      - cd starkingdoms-client
      - yarn
      - yarn build
      - cd dist
      - tar cJvf client.tar.xz *
\ No newline at end of file

  - name: build_image
    depends_on:
      - client_build
    image: node:21-alpine
    commands:
      - cd starkindoms-client
      - docker login registry.gitlab.com -u c0repwn3r -p $GITLAB_TOKEN
      - docker build . -t registry.gitlab.com/starkingdoms.tk/starkingdoms.tk/client:$(git describe --always)
      - docker push registry.gitlab.com/starkingdoms.tk/starkingdoms.tk/client:$(git describe --always)
    secrets: [ gitlab_token ]
\ No newline at end of file

D ansible/deploy.yml => ansible/deploy.yml +0 -28
@@ 1,28 0,0 @@
- name: Deploy game servers
  hosts: gameservers
  connection: ssh
  tasks:
    - name: Ensure host connectivity
      ansible.builtin.ping:
    - name: Stop game server
      ansible.builtin.command:
        cmd: sv stop starkingdoms
      become: true
    - name: Download new game server file
      ansible.builtin.get_url:
        url: "{{ server_binary_url }}"
        dest: /opt/starkingdoms/starkingdoms-server
        mode: '0777'
    - name: Remove old client assets
      ansible.builtin.shell:
        cmd: rm -rf assets
        chdir: /opt/starkingdoms/client/
    - name: Download and unpack client package
      ansible.builtin.unarchive:
        src: "{{ client_package_url }}"
        dest: /opt/starkingdoms/client/
        remote_src: yes
    - name: Start game server
      ansible.builtin.command:
        cmd: sv start starkingdoms
      become: true
\ No newline at end of file

D ansible/deploy_backplane.yml => ansible/deploy_backplane.yml +0 -19
@@ 1,19 0,0 @@
- name: Deploy backplane
  hosts: backplaneservers
  connection: ssh
  tasks:
    - name: Ensure host connectivity
      ansible.builtin.ping:
    - name: Stop backplane server
      ansible.builtin.command:
        cmd: sv stop starkingdoms-backplane
      become: true
    - name: Download new game server file
      ansible.builtin.get_url:
        url: "{{ backplane_binary_url }}"
        dest: /opt/starkingdoms-backplane/starkingdoms-backplane
        mode: '0777'
    - name: Start backplane server
      ansible.builtin.command:
        cmd: sv start starkingdoms-backplane
      become: true
\ No newline at end of file

D ansible/environments/beta.yml => ansible/environments/beta.yml +0 -30
@@ 1,30 0,0 @@
gameservers:
  hosts:
    srv01.beta.envs.starkingdoms.io:
      ansible_port: 20451
      ansible_password: !vault |
        $ANSIBLE_VAULT;1.1;AES256
        33386562363537373139313435386332323434366136346166393864336538306634373233323666
        6632646535373462313665663433663533393038353132370a366634323765633031313265313264
        37616232666538383737306461336131623634623534646161623738333861633662613464396232
        3665373430376137640a663435616461323732316632343061353336366538383937363830663132
        61303033353330653065353465663437303030663733646662636539353164396237626435383534
        3765366461396264393563616638393138633233303537303466
      ansible_become_password: !vault |
        $ANSIBLE_VAULT;1.1;AES256
        33386562363537373139313435386332323434366136346166393864336538306634373233323666
        6632646535373462313665663433663533393038353132370a366634323765633031313265313264
        37616232666538383737306461336131623634623534646161623738333861633662613464396232
        3665373430376137640a663435616461323732316632343061353336366538383937363830663132
        61303033353330653065353465663437303030663733646662636539353164396237626435383534
        3765366461396264393563616638393138633233303537303466
  vars:
    ansible_user: stk
apiservers:
  hosts:
    srv02.beta.envs.starkingdoms.io:
      ansible_port: 20551
      ansible_password: TODO
      ansible_become_password: TODO
  vars:
    ansible_user: stk
\ No newline at end of file

D ansible/environments/stable.yml => ansible/environments/stable.yml +0 -30
@@ 1,30 0,0 @@
gameservers:
  hosts:
    srv01.stable.envs.starkingdoms.io:
      ansible_port: 20450
      ansible_password: !vault |
        $ANSIBLE_VAULT;1.1;AES256
        35333334373234333231336333623532656638326438323230656133326362653465613739346636
        6139383536323339343963663763656439396564323633660a666237666537653639636431303664
        39663839623466646233313930306234653039393866336165363763363430393539383138643939
        6438653437373565300a343763373037383265626434316362393866336234633730386664326435
        32666335356338633339353839623539343234393465343061323730623366653563656135366237
        6633653335383836636333393064623139646366383831393430
      ansible_become_password: !vault |
        $ANSIBLE_VAULT;1.1;AES256
        35333334373234333231336333623532656638326438323230656133326362653465613739346636
        6139383536323339343963663763656439396564323633660a666237666537653639636431303664
        39663839623466646233313930306234653039393866336165363763363430393539383138643939
        6438653437373565300a343763373037383265626434316362393866336234633730386664326435
        32666335356338633339353839623539343234393465343061323730623366653563656135366237
        6633653335383836636333393064623139646366383831393430
  vars:
    ansible_user: stk
apiservers:
  hosts:
    srv02.stable.envs.starkingdoms.io:
      ansible_port: 20550
      ansible_password: TODO
      ansible_become_password: TODO
  vars:
    ansible_user: stk
\ No newline at end of file

D ansible/environments/unstable.yml => ansible/environments/unstable.yml +0 -30
@@ 1,30 0,0 @@
gameservers:
  hosts:
    srv01.unstable.envs.starkingdoms.io:
      ansible_port: 20452
      ansible_password: !vault |
        $ANSIBLE_VAULT;1.1;AES256
        30633533383938356363613936373132616565383938343732346462633263383237356364656139
        6564373961356564623930363538616539326562343733390a616564636332373666386531313033
        65623837366639393462333830616562366136343630393833393966663062343438326333393565
        3961663664623962310a663265313036663835636638636561303363373962303139396235633631
        32646362336332356630633138613765616563653164316134306463316466326266623863343631
        3134616435636662666637623638383736343064626564616135
      ansible_become_password: !vault |
        $ANSIBLE_VAULT;1.1;AES256
        30633533383938356363613936373132616565383938343732346462633263383237356364656139
        6564373961356564623930363538616539326562343733390a616564636332373666386531313033
        65623837366639393462333830616562366136343630393833393966663062343438326333393565
        3961663664623962310a663265313036663835636638636561303363373962303139396235633631
        32646362336332356630633138613765616563653164316134306463316466326266623863343631
        3134616435636662666637623638383736343064626564616135
  vars:
    ansible_user: stk
apiservers:
  hosts:
    srv02.unstable.envs.starkingdoms.io:
      ansible_port: 20552
      ansible_password: TODO
      ansible_become_password: TODO
  vars:
    ansible_user: stk
\ No newline at end of file

D ansible/global/backplane.yml => ansible/global/backplane.yml +0 -21
@@ 1,21 0,0 @@
backplaneservers:
  hosts:
    backplane.starkingdoms.io:
      ansible_password: !vault |
        $ANSIBLE_VAULT;1.1;AES256
        33613063633464623864346239346332383035366462393733643765376464363330326464353761
        3138363931396161326338313836303931643066316231650a383134383431316265623763613739
        39336332346130343133613831343533306435396337383663363561623831653230663036343463
        3531386332663837340a363737386338623765326330383738643031623734616538653236623131
        36323438343633323838333961616266643263343334366334346631656363383033383364366262
        6636386161313530646564363131346266393061386563303132
      ansible_become_password: !vault |
        $ANSIBLE_VAULT;1.1;AES256
        33613063633464623864346239346332383035366462393733643765376464363330326464353761
        3138363931396161326338313836303931643066316231650a383134383431316265623763613739
        39336332346130343133613831343533306435396337383663363561623831653230663036343463
        3531386332663837340a363737386338623765326330383738643031623734616538653236623131
        36323438343633323838333961616266643263343334366334346631656363383033383364366262
        6636386161313530646564363131346266393061386563303132
  vars:
    ansible_user: team
\ No newline at end of file

M docker/Dockerfile.build_env => docker/Dockerfile.build_env +2 -2
@@ 1,4 1,4 @@
FROM rust
FROM rust:alpine

# Note that we add wget here
RUN apt-get update && apt-get install --yes libpq-dev wget


@@ 9,4 9,4 @@ RUN wget https://github.com/mozilla/sccache/releases/download/v0.7.4/sccache-v0.
    && mv sccache-v0.7.4-x86_64-unknown-linux-musl/sccache /usr/local/bin/sccache \
    && chmod +x /usr/local/bin/sccache

RUN rustup component add rustfmt && rustup component add clippy
RUN rustup self update && rustup update && rustup component add rustfmt && rustup component add clippy

A starkingdoms-client/Dockerfile => starkingdoms-client/Dockerfile +5 -0
@@ 0,0 1,5 @@
FROM node:21-alpine

COPY dist .

RUN cd dist && node .