From 35f26d1b4a73e0b5b704418ff316e768766fa331 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Fri, 16 Oct 2020 19:35:29 +0200 Subject: [PATCH] Improve documentation * Add warning note to provision.sh * Link Local Setup Guide from README --- LOCAL_SETUP.md | 15 +++++++++++---- README.md | 23 ++--------------------- provision.sh | 3 +++ 3 files changed, 16 insertions(+), 25 deletions(-) diff --git a/LOCAL_SETUP.md b/LOCAL_SETUP.md index 37585191..7cc69d4f 100644 --- a/LOCAL_SETUP.md +++ b/LOCAL_SETUP.md @@ -1,5 +1,8 @@ -Local Setup with Vagrant -========== +# Local Setup + +If available, we prefer a native setup for best performance and less technical issues. Please see below for some details. + +## Vagrant ## Install prerequisites Install Vagrant - https://www.vagrantup.com/docs/installation/ @@ -98,7 +101,7 @@ admin@example.org:admin brew install docker open /Applications/Docker.app/ ``` -- Install nginx and adopt its config to forward requests to the **RAW** docker UNIX socket (see [this issue](https://github.com/docker/for-mac/issues/1662) for more details): +- Install nginx and adopt its config to forward requests to the **RAW** docker UNIX socket (see [this issue](https://github.com/docker/for-mac/issues/1662) for more details). Only required for macOS! ```shell script brew install nginx ``` @@ -136,7 +139,7 @@ admin@example.org:admin brew install geckodriver brew cask install firefox ``` -- Get a local copy of the config files: +- Get a local copy of the config files and verify the settings: ```shell script for f in action_mailer.yml database.yml secrets.yml code_ocean.yml docker.yml.erb mnemosyne.yml do @@ -158,3 +161,7 @@ admin@example.org:admin rake db:migrate rake db:seed ``` +- Start the server: + ```shell script + rails s + ``` diff --git a/README.md b/README.md index 4d905940..b52b3bde 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ CodeOcean is mainly used in the context of MOOCs (such as those offered on openH ## Development Setup +Please refer to the [Local Setup Guide](LOCAL_SETUP.md) for more details. + ### Mandatory Steps - install the Docker client @@ -46,24 +48,3 @@ In order to execute code submissions using Docker, source code files are written - create production configuration files (*database.production.yml*, …) - customize *config/deploy/production.rb* if you want to deploy using [Capistrano](http://capistranorb.com/) - - -## Useful service maintenance commands - -- delete all containers (include running ones) `docker rm -f $(docker ps -aq)` -- if the application is run as a service restart it by using `service codeocean restart` -- `/etc/init.d/postgresql restart` -- if deployed via capistrano you will find the logs at `/var/www/app/shared/log/` -> `production.log` - -## Roadmap - -1.1 - - [x] WebSocket Suppport - [x] Interactive Exercises - [ ] Allow Disabling of File Creation - [ ] Set Container Recyling per Environment - - - - diff --git a/provision.sh b/provision.sh index ec515653..ccd57e4a 100644 --- a/provision.sh +++ b/provision.sh @@ -2,6 +2,9 @@ # rvm/rails installation from https://gorails.com/setup/ubuntu/14.04 # passenger installation from https://www.phusionpassenger.com/library/install/nginx/install/oss/trusty/ + +echo "OUTDATED - This script might be outdated due to the dedicated DockerContainerPool" + ######## VERSION INFORMATION ######## postgres_version=10