ansible-nas/roles/code-server/tasks/main.yml
HitLuca 8d5b4e8d22 added code-server app
🚧 still missing docs
2022-08-21 22:07:39 +02:00

25 lines
1 KiB
YAML

---
- name: Code Server Docker Container
docker_container:
name: code_server
image: linuxserver/code-server
pull: true
volumes:
- "{{ code_server_config_directory }}:/config"
- "{{ code_server_projects_directory }}:/code:rw"
ports:
- "{{ code_server_port }}:8443"
env:
TZ: "{{ ansible_nas_timezone }}"
DEFAULT_WORKSPACE: "/code"
PUID: "{{ code_server_user_id }}"
PGID: "{{ code_server_group_id }}"
restart_policy: unless-stopped
memory: "{{ code_server_memory }}"
labels:
traefik.enable: "{{ code_server_available_externally | string }}"
traefik.http.routers.code_server.rule: "Host(`{{ code_server_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.code_server.tls.certresolver: "letsencrypt"
traefik.http.routers.code_server.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.code_server.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.code_server.loadbalancer.server.port: "8443"