Files
code-server/guides/heroku.md
2021-03-04 05:10:34 -05:00

2.0 KiB

Guide: Launching code-server on Heroku

code-server and railway.app

Railway is a new cloud development platform! ☁️ Use Railway + code-server to get a dev environment that you can access from any device.

Step 1: Click to deploy Deploy on Railway


Step 2: Configure & launch your environment

railway launch environment screen

You'll need to make a new repository which will contain your code-server configuration. If you push changes to this repo (to install NodeJS, for example), it will re-deploy code-server.

You also need to specity a PASSWORD and a GIT_REPO to clone in your environment :)

Step 3: Modify your environment to add additional tools

railway repo

  1. In Railway, go to Deployments -> Triggers to see your source repo.

  2. Open the source repo in GitHub and edit the Dockerfile

  3. Add some custom tools (like NodeJS) and commit to the main branch:

    # You can add custom software and dependencies for your environment here. Some examples:
    
    # RUN code-server --install-extension esbenp.prettier-vscode
    # RUN sudo apt-get install -y build-essential
    # RUN COPY myTool /home/coder/myTool
    
    # Install NodeJS
    RUN sudo curl -fsSL https://deb.nodesource.com/setup_15.x | sudo bash -
    RUN sudo apt-get install -y nodejs
    
  4. Head back to Railway and notice a new deployment was created. After it has completed, you can use these tools in your environment.

  5. (Optional): Configure rclone so that you can save your VS Code config and files without commiting