Compare commits
5 Commits
cfc1188b5f
...
987166420a
| Author | SHA1 | Date | |
|---|---|---|---|
| 987166420a | |||
| 8ba47c2ebf | |||
| 8bfd8395f5 | |||
| f0b15f77a1 | |||
| 461d251356 |
@@ -5,15 +5,13 @@
|
|||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: openssh
|
name: openssh
|
||||||
state: present
|
state: present
|
||||||
when: ansible_pkg_mgr == 'pacman' and 'microsoft-standard-WSL2' not in ansible_kernel
|
when: ansible_pkg_mgr == 'pacman'
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Ensure openssh-server is installed on non-Arch systems
|
- name: Ensure openssh-server is installed on non-Arch systems
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: openssh-server
|
name: openssh-server
|
||||||
state: present
|
state: present
|
||||||
when: ansible_pkg_mgr != 'pacman' and 'microsoft-standard-WSL2' not in ansible_kernel
|
when: ansible_pkg_mgr != 'pacman'
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Ensure Borg is installed on Arch-based systems
|
- name: Ensure Borg is installed on Arch-based systems
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
@@ -161,3 +159,7 @@
|
|||||||
enabled: true
|
enabled: true
|
||||||
hosts:
|
hosts:
|
||||||
- mennos-server
|
- mennos-server
|
||||||
|
- name: necesse
|
||||||
|
enabled: true
|
||||||
|
hosts:
|
||||||
|
- mennos-server
|
||||||
|
|||||||
15
ansible/tasks/servers/services/necesse/docker-compose.yml.j2
Normal file
15
ansible/tasks/servers/services/necesse/docker-compose.yml.j2
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
services:
|
||||||
|
necesse:
|
||||||
|
image: brammys/necesse-server
|
||||||
|
container_name: necesse
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "14159:14159/udp"
|
||||||
|
environment:
|
||||||
|
- MOTD=StarDebris' Server!
|
||||||
|
- PASSWORD=2142
|
||||||
|
- SLOTS=4
|
||||||
|
- PAUSE=1
|
||||||
|
volumes:
|
||||||
|
- {{ necesse_data_dir }}/saves:/necesse/saves
|
||||||
|
- {{ necesse_data_dir }}/logs:/necesse/logs
|
||||||
41
ansible/tasks/servers/services/necesse/necesse.yml
Normal file
41
ansible/tasks/servers/services/necesse/necesse.yml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
- name: Deploy Necesse service
|
||||||
|
block:
|
||||||
|
- name: Set Necesse directories
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
necesse_service_dir: "{{ ansible_env.HOME }}/.services/necesse"
|
||||||
|
necesse_data_dir: "/mnt/services/necesse"
|
||||||
|
|
||||||
|
- name: Create Necesse service directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ necesse_service_dir }}"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Create Necesse data directories
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
loop:
|
||||||
|
- "{{ necesse_data_dir }}"
|
||||||
|
- "{{ necesse_data_dir }}/saves"
|
||||||
|
- "{{ necesse_data_dir }}/logs"
|
||||||
|
|
||||||
|
- name: Deploy Necesse docker-compose.yml
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: docker-compose.yml.j2
|
||||||
|
dest: "{{ necesse_service_dir }}/docker-compose.yml"
|
||||||
|
mode: "0644"
|
||||||
|
register: necesse_compose
|
||||||
|
|
||||||
|
- name: Stop Necesse service
|
||||||
|
ansible.builtin.command: docker compose -f "{{ necesse_service_dir }}/docker-compose.yml" down --remove-orphans
|
||||||
|
when: necesse_compose.changed
|
||||||
|
|
||||||
|
- name: Start Necesse service
|
||||||
|
ansible.builtin.command: docker compose -f "{{ necesse_service_dir }}/docker-compose.yml" up -d
|
||||||
|
when: necesse_compose.changed
|
||||||
|
tags:
|
||||||
|
- services
|
||||||
|
- necesse
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
register: juicefs_stop
|
register: juicefs_stop
|
||||||
changed_when: juicefs_stop.changed
|
changed_when: juicefs_stop.changed
|
||||||
when: redis_compose.changed and juicefs_service_stat.stat.exists
|
when: redis_compose.changed and juicefs_service_stat.stat.exists
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: List containers that are running
|
- name: List containers that are running
|
||||||
ansible.builtin.command: docker ps -q
|
ansible.builtin.command: docker ps -q
|
||||||
@@ -68,6 +69,7 @@
|
|||||||
register: juicefs_start
|
register: juicefs_start
|
||||||
changed_when: juicefs_start.changed
|
changed_when: juicefs_start.changed
|
||||||
when: juicefs_service_stat.stat.exists
|
when: juicefs_service_stat.stat.exists
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Restart containers that were stopped
|
- name: Restart containers that were stopped
|
||||||
ansible.builtin.command: docker start {{ item }}
|
ansible.builtin.command: docker start {{ item }}
|
||||||
|
|||||||
@@ -45,3 +45,9 @@ CORS_ALLOWED_ORIGINS=https://sathub.de,https://sathub.nl,https://api.sathub.de
|
|||||||
# Frontend configuration (optional - defaults are provided)
|
# Frontend configuration (optional - defaults are provided)
|
||||||
VITE_API_BASE_URL=https://api.sathub.de
|
VITE_API_BASE_URL=https://api.sathub.de
|
||||||
VITE_ALLOWED_HOSTS=sathub.de,sathub.nl
|
VITE_ALLOWED_HOSTS=sathub.de,sathub.nl
|
||||||
|
|
||||||
|
# Discord related messsaging
|
||||||
|
DISCORD_CLIENT_ID={{ lookup('community.general.onepassword', 'sathub', vault='Dotfiles', field='DISCORD_CLIENT_ID') }}
|
||||||
|
DISCORD_CLIENT_SECRET={{ lookup('community.general.onepassword', 'sathub', vault='Dotfiles', field='DISCORD_CLIENT_SECRET') }}
|
||||||
|
DISCORD_REDIRECT_URI={{ lookup('community.general.onepassword', 'sathub', vault='Dotfiles', field='DISCORD_REDIRECT_URL') }}
|
||||||
|
DISCORD_WEBHOOK_URL={{ lookup('community.general.onepassword', 'sathub', vault='Dotfiles', field='DISCORD_WEBHOOK_URL') }}
|
||||||
|
|||||||
@@ -62,6 +62,12 @@ services:
|
|||||||
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
|
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
|
||||||
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
|
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
|
||||||
- MINIO_EXTERNAL_URL=https://obj.sathub.de
|
- MINIO_EXTERNAL_URL=https://obj.sathub.de
|
||||||
|
|
||||||
|
# Discord settings
|
||||||
|
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
|
||||||
|
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET}
|
||||||
|
- DISCORD_REDIRECT_URI=${DISCORD_REDIRECT_URI}
|
||||||
|
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}
|
||||||
networks:
|
networks:
|
||||||
- sathub
|
- sathub
|
||||||
- caddy_network
|
- caddy_network
|
||||||
@@ -98,6 +104,12 @@ services:
|
|||||||
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
|
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
|
||||||
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
|
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
|
||||||
- MINIO_EXTERNAL_URL=https://obj.sathub.de
|
- MINIO_EXTERNAL_URL=https://obj.sathub.de
|
||||||
|
|
||||||
|
# Discord settings
|
||||||
|
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
|
||||||
|
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET}
|
||||||
|
- DISCORD_REDIRECT_URI=${DISCORD_REDIRECT_URI}
|
||||||
|
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}
|
||||||
networks:
|
networks:
|
||||||
- sathub
|
- sathub
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -113,7 +125,7 @@ services:
|
|||||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||||
- POSTGRES_DB=${DB_NAME:-sathub}
|
- POSTGRES_DB=${DB_NAME:-sathub}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- {{ sathub_data_dir }}/postgres_data:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
- sathub
|
- sathub
|
||||||
|
|
||||||
@@ -136,7 +148,7 @@ services:
|
|||||||
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
|
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
|
||||||
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
|
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- minio_data:/data
|
- {{ sathub_data_dir }}/minio_data:/data
|
||||||
command: server /data --console-address :9001
|
command: server /data --console-address :9001
|
||||||
networks:
|
networks:
|
||||||
- sathub
|
- sathub
|
||||||
@@ -158,12 +170,6 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- sathub
|
- sathub
|
||||||
|
|
||||||
volumes:
|
|
||||||
minio_data:
|
|
||||||
driver: local
|
|
||||||
postgres_data:
|
|
||||||
driver: local
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
sathub:
|
sathub:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
Reference in New Issue
Block a user