This Docker container is a IDE / Code editor, built from C9 SDK. With C9 IDE you can set up development environments in the cloud. It comes with nvm, pm2 and nginx that can help you publish your application pulically accessible to the world.
C9SDK_PASSWORD
: password for basic auth. it would be publically accessible if this env is not definedGIT_REPO
: automatic git repo deploymentGIT_BRANCH
: target branch, if not present, default branch will be used.INITIAL_COMMAND
: custom command that can be used for installing custom dependencies or even start your git repo your own way
- Online - cross device development. it is an alternative to code-server. it is lighter than code-server which will be more resouce (cost) effective.
- Run any real world application without Docker (DinD is not yet supported in Railway)
- Gitlab Runner Shell executor for Gitlab CI/CD
- Run your application at some local port. for example: python -m SimpleHTTPServer 9000 to start a static web server at port 9000.
- Prepare your domain and add to Service settings -> networking. make sure the DNS record is setup.
- Add a nginx conf files to /etc/nginx/sites-enabled to reserve proxy your application. make sure to use server_name your_domain;
- Run nginx -t to test your .conf file
- Run nginx -s reload to apply changes.
- Your application should be pulically accessible now.
- The start script checks the environment variable
GIT_REPO
(andGIT_BRANCH
) and automatically clones and deploys the repository. GIT_REPO
should behttps
url containing access token key- The repo will be cloned to
/root/the-project
. - The repo needs to have the following deployment structure, which is:
depoyments
: folder-
deploy.sh
: suppose to install project deps and start the project
-
setup-cron.sh
suppose to setup cron for automatically checking new commit and pull and re-deploy
-
setup-nginx.sh
suppose to setup nginx reserve proxy with production domain name