feat: add Docker service management script and Golink service deployment configuration
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
This commit is contained in:
@ -0,0 +1,11 @@
|
||||
name: golink
|
||||
services:
|
||||
server:
|
||||
image: ghcr.io/tailscale/golink:main
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TS_AUTHKEY={{ lookup('onepassword', '4gsgavajnxfpcrjvbkqhoc4drm', vault='j7nmhqlsjmp2r6umly5t75hzb4') }}
|
||||
volumes:
|
||||
- /mnt/services/golink:/home/nonroot
|
||||
restart: "unless-stopped"
|
@ -1,20 +1,20 @@
|
||||
---
|
||||
- name: Ensure golink data directory exists
|
||||
ansible.builtin.file:
|
||||
path: /mnt/storage-box/golink/data
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: '1000'
|
||||
group: '100'
|
||||
- name: Deploy GoLink service
|
||||
block:
|
||||
- name: Create GoLink directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
loop:
|
||||
- /mnt/storage-box/services/golink
|
||||
|
||||
- name: Deploy golink docker container
|
||||
community.docker.docker_container:
|
||||
name: golink
|
||||
image: ghcr.io/tailscale/golink:main
|
||||
restart_policy: unless-stopped
|
||||
env:
|
||||
PUID: '1000'
|
||||
PGID: '100'
|
||||
TS_AUTHKEY: "{{ lookup('onepassword', '4gsgavajnxfpcrjvbkqhoc4drm', vault='j7nmhqlsjmp2r6umly5t75hzb4') }}"
|
||||
volumes:
|
||||
- /mnt/storage-box/golink/data:/home/nonroot
|
||||
- name: Deploy GoLink docker-compose.yml
|
||||
ansible.builtin.template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: /mnt/storage-box/services/golink/docker-compose.yml
|
||||
mode: "0644"
|
||||
register: golink_compose
|
||||
|
||||
- name: Start GoLink service
|
||||
ansible.builtin.command: docker-compose -f /mnt/storage-box/services/golink/docker-compose.yml up -d
|
||||
when: golink_compose.changed
|
||||
|
Reference in New Issue
Block a user