Giter VIP home page Giter VIP logo

cloud9's Introduction

Cloud9 in a Docker Container

This is a recently built (2019) instance of Cloud9 running inside a Docker container. The latest tag does not come with additional packages installed and is ideal for connecting with any other container, while other tags specify what sort of additional packages are installed along with Cloud9.

The following is an example docker-compose.yml file for running Cloud9 connected to another container. In this example, your project files would actually be served by the container using the php:7.2-apache image, but you would edit the files through the separate Cloud9 container.

version: '3'
services:
  app:
    image: php:7.2-apache
    container_name: 'app'
    ports:
      - 80:80
    volumes: ./workspace:/var/www/html:rw
  db:
    image: mariadb
    container_name: 'db'
    ports:
      - 3306:3306
    environment:
      MYSQL_USER: 'username'
      MYSQL_PASSWORD: 'secretp4ss'
      MYSQL_DATABASE: 'database'
      MYSQL_ROOT_PASSWORD: 'supersecretp4ss'
    volumes:
      - ./db-data:/var/lib/mysql:rw
  adminer:
    image: mcaubrey/adminer
    container_name: 'adminer'
    ports:
      - 8080:8080
    environment:
      ADMINER_DEFAULT_SYSTEM: "mysql"
      ADMINER_DEFAULT_SERVER: "db"
      ADMINER_DEFAULT_USERNAME: "username"
      ADMINER_DEFAULT_PASSWORD: "secretp4ss"
      ADMINER_DEFAULT_DATABASE: "database"
  c9:
    image: mcaubrey/cloud9
    container_name: c9
    volumes:
      - ./workspace:/var/www/html:rw
    ports:
      - 9000:8080
    environment:
      WORKSPACE: '/var/www/html'

The Cloud9 image with the php7.2-apache tag comes with PHP 7.2, Composer and Apache already installed and ready to go. Here is an example setup where the files are being served by the Cloud9 container.

version: '3'
services:
  db:
    image: mariadb
    container_name: 'db'
    ports:
      - 3306:3306
    environment:
      MYSQL_USER: 'username'
      MYSQL_PASSWORD: 'secretp4ss'
      MYSQL_DATABASE: 'database'
      MYSQL_ROOT_PASSWORD: 'supersecretp4ss'
    volumes:
      - ./db-data:/var/lib/mysql:rw
  adminer:
    image: mcaubrey/adminer
    container_name: 'adminer'
    ports:
      - 8080:8080
    environment:
      ADMINER_DEFAULT_SYSTEM: "mysql"
      ADMINER_DEFAULT_SERVER: "db"
      ADMINER_DEFAULT_USERNAME: "username"
      ADMINER_DEFAULT_PASSWORD: "secretp4ss"
      ADMINER_DEFAULT_DATABASE: "database"
  c9:
    image: mcaubrey/cloud9:php7.2-apache
    container_name: c9
    volumes:
      - ./workspace:/var/www/html:rw
    ports:
      - 80:80
      - 9000:8080
    environment:
      WORKSPACE: '/var/www/html'

Environment Variables

This image comes with a few environment variables to help you customize your experience. By setting $C9_USER and $C9_PASS, you'll enable authorization making it so that users must present and username and password to access your workspace. You can specify the location of your workspace with the C9_WORKSPACE variable. This should generally match the location of your mounted volume. Last, there is a $C9_EXTRA variable for you to include anything else you want to run as an argument to Cloud9's server.js file. You'll most likely not need this, but it is there for you if you want it.

cloud9's People

Contributors

michaelcharles avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

artyomlisovskij

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.