Sign inSign up

codiecloud/codie-server

By codiecloud

•Updated almost 6 years ago

code-server manager

Image
0

50K+

codiecloud/codie-server repository overview

⁠Codie

This is an work in progress from a weekend project.

The aim is to make a small interface that manages several coding project environments, using code-server.

⁠Install

Run

docker run --name codie-server -v codie-proxy:/app/proxy -v codie-storage:/app/storage -v /var/run/docker.sock:/var/run/docker.sock -e PROXY_VOLUME=codie-proxy -e SERVER_LINK=codie-server -d codiecloud/codie-server

Then navigate to local.codie.cloud:9876⁠ and login with admin/admin.

⁠What does this do exactly?

Here's some features:

  • Create and manage several projects, which can be reached from the main interface
  • Launch a project into a code-server container
  • Coding containers are automatically proxied by sub-domain. e.g. <proxy_slug>.local.codie.cloud:9876
  • Internal server inside coding containers are automatically proxied by sub-sub-domain. e.g. <port>.<proxy_slug>.local.codie.cloud:9876
  • Authentication required to reach sub-domains
  • Initialise coding containers with with coding resources (nodejs, golang, etc...)
  • Start/Stop/Restart/Remove/Rebuild Coding containers from the main interface
  • Manage several users that have their own isolated projects
  • User directory/profile settings shared between a user's projects

⁠Configuration Options?

Sure!

Env VarDefaultDescription
SERVER_LINKrequiredname of the codie-server container
PROXY_VOLUMErequiredname of the volume that the codie-server writes it's proxy configs to
PROXY_DOMAINlocal.codie.clouddomain used to access the proxy
PROXY_PORT9876exposed port for the proxy, change to 80 to not have to specify
INIT_USERNAMEadmininitial user username, the user is populated if the users file is empty
INIT_PASSWORDadmininitial user password
CODER_IMAGEcodercom/code-serverimage used for the coding container, roll your own!
CODER_PORT8080internal exposed port for the code server
CODER_USERcoderinternal user in the code container
COOKIE_NAMEcloud.codie.local.sidname of the cookie used to store the session ID
COOKIE_SECRETautomatic 128-char secretsecret used for session cookie encryption

⁠Custom Domain

Say we want to use example.com.

You'll first need to create two DNS records, one for the root example.com and a wildcard for all sub-domains *.example.com, pointing to the server.

You'll then need to add the following env to the run script: -e PROXY_DOMAIN=example.com

Optionally you can set the port to 80 by adding the following env: -e PROXY_PORT=80

⁠Using a public IP

The domain local.codie.cloud and all sub-domains *.local.codie.cloud are set-up to point to 0.0.0.0, also known as localhost.

If you want to set this up on a public IP address and work remotely. You'll need to setup a custom domain.

It is also recommended that you use https by either using Cloudflare or Let's Encrypt and another proxy.

Tag summary

Content type

Image

Digest

Size

192.2 MB

Last updated

almost 6 years ago

docker pull codiecloud/codie-server