added code-server app

🚧 still missing docs
This commit is contained in:
HitLuca 2022-08-21 22:07:39 +02:00
parent ddc9bb1d87
commit 8d5b4e8d22
5 changed files with 60 additions and 0 deletions

View file

@ -90,6 +90,7 @@ If you have a spare domain name you can configure applications to be accessible
* [Ubooquity](http://vaemendis.net/ubooquity/) - Book and comic server
* [uTorrent](https://www.utorrent.com/) - The best torrent downloading app for beginners
* [Virtual Desktop](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom) - A virtual desktop running on your NAS.
* [Code](https://code.visualstudio.com/) - Powerful and open source IDE accessible through the browser
* [Wallabag](https://wallabag.org/) - Save and classify articles. Read them later.
* [Watchtower](https://github.com/v2tec/watchtower) - Monitor your Docker containers and update them if a new version is available
* [Wireshark](https://www.wireshark.org/) - the worlds foremost and widely-used network protocol analyzer.

View file

@ -68,6 +68,9 @@ photos_root: "{{ samba_shares_root }}/photos"
# Where paperless_ng consumes documents
documents_root: "{{ samba_shares_root }}/documents"
# Where personal repos and code are stored
code_root: "{{ samba_shares_root }}/code"
# The description that'll appear next to your Ansible-NAS box when browsing your network
samba_server_string: Ansible NAS
@ -169,6 +172,14 @@ samba_shares:
browseable: yes
path: "{{ documents_root }}"
- name: code
comment: "Code"
guest_ok: yes
public: yes
writable: yes
browseable: yes
path: "{{ code_root }}"
###
### NFS
###

View file

@ -420,6 +420,11 @@
- virtual_desktop
when: (virtual_desktop_enabled | default(False))
- role: code-server
tags:
- code-server
when: (code_server_enabled | default(False))
- role: wallabag
tags:
- wallabag

View file

@ -0,0 +1,18 @@
---
code_server_enabled: false
code_server_available_externally: false
# directories
code_server_config_directory: "{{ docker_home }}/code_server"
code_server_projects_directory: "{{ code_root }}"
# uid / gid
code_server_user_id: "0"
code_server_group_id: "0"
# network
code_server_port: "8443"
code_server_hostname: "code-server"
# specs
code_server_memory: 1g

View file

@ -0,0 +1,25 @@
---
- 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"