Free VS Code Workaround
#1
Hey guys, I figure this may be interesting to a few folks so wanted to share.

New to ARM and finding things can be a little trickier than I expected, so when I was setting up a dev environment I wanted to keep things simple and have my code compiled and running in an x64 machine.

So long story short I ran up an always free remote VPS and installed a virtual IDE there I can get at through the browser which will then be accessible across any of the images I boot on the PBP Smile


Quick steps are:

1) Get a free VPS - currently Oracle will give anyone two free linux boxes (plus DB plus other stuff) forever, so I like this option (cloud.oracle.com/free) although I'm sure other options are available.
2) SSH into the remote box and install docker | docker-compose
3) Setup an a record on your domain e.g. vs.*** points to server IP.
4) Here's the docker compose setup I use to run the container with SSL behind an NGINX reverse proxy.


Code:
version: '2'

services:

 proxy:
   image: jwilder/nginx-proxy
   container_name: proxy
   restart: unless-stopped
   labels:
     com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
   volumes:
     - /var/run/docker.sock:/tmp/docker.sock:ro
     - certs:/etc/nginx/certs:rw
     - vhost.d:/etc/nginx/vhost.d
     - html:/usr/share/nginx/html
     - ./uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf:ro
   ports:
     - "80:80"
     - "443:443"
   networks:
     - "default"
     - "proxy-tier"

 proxy-letsencrypt:
   image: jrcs/letsencrypt-nginx-proxy-companion
   container_name: letsencrypt
   restart: unless-stopped
   environment:
     - NGINX_PROXY_CONTAINER=proxy
   volumes:
     - /var/run/docker.sock:/var/run/docker.sock:ro
   volumes_from:
     - "proxy"
   depends_on:
     - "proxy"
   networks:
     - "default"
     - "proxy-tier"

 portainer:
   image: portainer/portainer
   container_name: portainer
   restart: always
   environment:
     - VIRTUAL_HOST=dock.YOURDOMAIN
     - LETSENCRYPT_HOST=dock.YOURDOMAIN
     - LETSENCRYPT_EMAIL=hi@YOURDOMAIN
   volumes:
     - ./portainer/:/data
     - /var/run/docker.sock:/var/run/docker.sock
   ports:
     - "9000:9000"

 code-server:
   image: linuxserver/code-server
   container_name: code-server
   restart: unless-stopped
   environment:
     - PUID=1000
     - PGID=1000
     - TZ=Australia/Perth
     - VIRTUAL_HOST=vs.YOURDOMAIN
     - LETSENCRYPT_HOST=vs.YOURDOMAIN
     - LETSENCRYPT_EMAIL=hi@YOURDOMAIN
     - PASSWORD=YOURPASSWORD
     - SUDO_PASSWORD=YOURSUDO
   volumes:
     - /codeserver/config:/config
   ports:
     - 8443:8443

volumes:
 certs:
 vhost.d:
 html:

networks:
 proxy-tier:


e' voila!

Ideally I was going to run the head melted vs code locally and then just ssh to the server as a remote host, but this currently isn't supported in the hed melted version as the feature is pre-release in VS code.... If anyone knows the workaround to that I'd be interested - as that feels like a cleaner approach!
#2
Head melted works fine for me: https://forum.pine64.org/showthread.php?tid=8598
#3
(01-23-2020, 07:53 AM)clover Wrote: Head melted works fine for me: https://forum.pine64.org/showthread.php?tid=8598

Can you use the remote-SSH extensions? These load but don't work on my Manjaro & head melted install?


Possibly Related Threads…
Thread Author Replies Views Last Post
  Instructions for Installing VS Code on Manjaro clover 6 14,195 06-04-2020, 09:37 PM
Last Post: pfeerick

Forum Jump:


Users browsing this thread: 1 Guest(s)