parameterise and clean up docker config
This commit is contained in:
parent
59ecec9df7
commit
e2d1b197e6
3 changed files with 11 additions and 11 deletions
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
headscale_dir: /home/headscale
|
||||
headscale_domain: ~
|
||||
headscale_dir: /home/headscale
|
||||
headscale_docker_image: docker.io/headscale/headscale:0.22
|
||||
headscale_ui_docker_image: ghcr.io/gurucomputing/headscale-ui:latest
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
# - headscale (control-plane server)
|
||||
# - headscale-ui (web UI for managing headscale)
|
||||
# - labels to configure Traefik-2 reverse-proxy
|
||||
# - ### currently hard-codes a Traefik middleware 'chain@authelia'
|
||||
# - ### currently exposes the ports for local connections, for debugging
|
||||
#
|
||||
# Configuration:
|
||||
|
@ -32,12 +33,12 @@
|
|||
pull: false
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
roles:
|
||||
|
||||
- import_role: name=headscale
|
||||
- role: headscale
|
||||
# example of tags you may wish to use for this task
|
||||
tags: headscale
|
||||
# the following variable must be defined to use the role
|
||||
# the following variables must be defined to use the role
|
||||
vars:
|
||||
# the (sub)domain of this server
|
||||
# (your reverse-proxy will route it)
|
||||
|
|
|
@ -10,14 +10,13 @@
|
|||
- name: config file
|
||||
template: src="config.yaml.j2" dest="{{ headscale_dir }}/config/config.yaml" # mode= o= g=
|
||||
|
||||
# create an empty database file if it doesn't exist
|
||||
- name: database file
|
||||
copy: force="no" content="" dest="{{ headscale_dir }}/data/db.sqlite" # mode= o= g=
|
||||
- name: create an empty database file if it doesn't exist
|
||||
copy: force=false content="" dest="{{ headscale_dir }}/data/db.sqlite" # mode= o= g=
|
||||
|
||||
- name: headscale coordination server
|
||||
docker_container:
|
||||
name: headscale
|
||||
image: headscale/headscale:latest-alpine
|
||||
image: "{{ headscale_docker_image }}"
|
||||
pull: "{{ headscale_pull }}"
|
||||
command: headscale serve
|
||||
restart_policy: unless-stopped
|
||||
|
@ -33,8 +32,6 @@
|
|||
- "9441:8080"
|
||||
- "9442:9090" # /metrics
|
||||
- "50443:50443" # /headscale grpc API
|
||||
exposed_ports:
|
||||
- "50443"
|
||||
|
||||
# (If a given namespace already exists, the command issues an error
|
||||
# message but the exit code is 0 (successful).)
|
||||
|
@ -50,7 +47,7 @@
|
|||
- name: headscale UI
|
||||
docker_container:
|
||||
name: headscale-ui
|
||||
image: ghcr.io/gurucomputing/headscale-ui:latest
|
||||
image: "{{ headscale_ui_docker_image }}"
|
||||
pull: "{{ headscale_pull }}"
|
||||
restart_policy: unless-stopped
|
||||
labels:
|
||||
|
|
Loading…
Add table
Reference in a new issue