Skip to content

bpmct/coder-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

coder-project-template

An example template for building a custom Coder workspace around a project. This includes:

  • Coder workspace template - .coder/coder.yaml
  • Custom image for Coder - .coder/img
  • GitHub Actions CI for building the custom image - .github/workflows/build-image.yaml
  • Sample "app code" in src/

Set up

  1. Use this template to create your own repository

  2. Add secrets to the repository with your Docker Hub account details:

     DOCKERHUB_USERNAME (your username for Docker Hub)
     DOCKERHUB_TOKEN (your password or token)
    
  3. Rename username/projectname in .coder/coder.yaml and projectname in .github.workflows/build-image.yaml. Username should be the same as your DOCKERHUB_USERNAME you set above.

  4. Push to main (to build the image).

  5. Add the image into Coder. (repository: your value for username/projectname tag: latest)

  6. If you haven't already, enable Workspace Templates under Manage -> Admin -> Templates

  7. You're done! 🎉 Create a new workspace from this template in the Ui, or create an embeddable button/link for others to clone.

    • The "project repository" can also be this repository if you want the workspace to be defined in the same place. I often do this.

To modify the image or workspace definition, simply push to main . GitHub actions will re-build the image and Coder will notify developers when an update is available for their workspace.

Check out this video for an overview on how this works: https://youtu.be/BrZhBJtjkYk?t=104

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published