~starkingdoms/starkingdoms

ref: f2578715981d2839686d7d8abb99be879f92f9f9 starkingdoms/ansible/deploy-stable.yaml -rw-r--r-- 1.5 KiB
f2578715 — ghostlyzsh no more other player viewing ghost, also odd bug where players can change bodies but cant replicate it anymore 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
- name: Deploy stable servers
  hosts: starkingdoms_prod_servers_stable
  vars:
    # Randomly generated per-deployment secrets
    api_key: "{{ lookup('community.general.random_string', base64=True, length=24) }}"
    jwt_signing_secret: "{{ lookup('community.general.random_string', base64=True, length=24) }}"

    # Database info
    db_name: starkingdoms-bleeding

    # What version of the docker container should be deployed?
    version: stable

    ws_port: 3204
    api_port: 3205
    web_port: 3206

    api_config_dir: /home/stk-deploy/config
    db_data_dir: /home/stk-deploy/data
    compose_dir: /home/stk-deploy

    api_url: https://api.starkingdoms.io
    game_url: https://starkingdoms.io
  tasks:
    - name: Ensure host connectivity
      ansible.builtin.ping:
    - name: Create configuration directory
      ansible.builtin.file:
        path: "{{ api_config_dir }}"
        state: directory
        mode: 0755
    - name: Create data directory
      ansible.builtin.file:
        path: "{{ db_data_dir }}"
        state: directory
        mode: 0755
    - name: Create API config file
      ansible.builtin.template:
        src: ../docker/config.jinja.toml
        dest: "{{ api_config_dir }}/config.toml"
        force: no
    - name: Create docker-compose config file
      ansible.builtin.template:
        src: ../docker/docker-compose.jinja.yml
        dest: "{{ compose_dir }}/docker-compose.yml"
        force: no
    - name: Start the server
      ansible.builtin.shell:
        cmd: docker-compose up -d
        chdir: "{{ compose_dir }}"