ansible-nas icon indicating copy to clipboard operation
ansible-nas copied to clipboard

Add VSCode Server image

Open HitLuca opened this issue 3 years ago • 1 comments

Used for remote development, I think this app would be a nice addition to this project.

The site for the docker image is this, and the setup guide for docker is here.

The setup is pretty straightforward, In my case I created the container using Portainer, and mounted my projects folder from a zpool dataset.

Here is my setup if it can help design the feature:

version: '3.7' 
services: 
    vscode_server: 
        image: codercom/code-server
        container_name: vscode_server 
        restart: unless-stopped 
        ports:
            - 9050:8080 #<- the vscode image uses port 8080, so we need to change it since nextcloud uses it
        volumes: 
            - ${CONFIG_FOLDER}:/home/coder/.config
            - ${PROJECTS_FOLDER}:/home/coder/project
        environment: 
            - TZ=${TZ}
            - DOCKER_USER=$USER            

HitLuca avatar Jun 15 '22 08:06 HitLuca

One thing that may be needed is a place for ansible-nas to store projects as a zfs dataset, like {{ samba_shares_root }}/projects. This is because I don't see a better place for them, as they are not docs or something to be put in dump.

If it's ok to have this requirement I can make a PR

HitLuca avatar Jul 23 '22 15:07 HitLuca

On my mental to-do list is beefing up the dev and CI/CD tooling, so I think this is an awesome addition. Also happy to have an additional _root. code_root ?

davestephens avatar Aug 21 '22 09:08 davestephens

Then I propose to have a {{ samba_shares_root }}/code (that may or may not be exposed as samba share), and have vscode point to it as its projects root

HitLuca avatar Aug 21 '22 12:08 HitLuca

I'm not particularly wedded to any name, but the directory name and <thing>_root should match.

davestephens avatar Aug 21 '22 18:08 davestephens