-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/autofocus
Conflicts: ide/static/ide/js/resources.js ide/templates/ide/project/resource.html
- Loading branch information
Showing
39 changed files
with
1,677 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ src/ | |
.cache/ | ||
.env/ | ||
.idea/ | ||
bower_components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
FROM python:2.7 | ||
MAINTAINER Katharine Berry <[email protected]> | ||
|
||
ENV NPM_CONFIG_LOGLEVEL=info NODE_VERSION=4.2.3 DJANGO_VERSION=1.6 | ||
|
||
# Node stuff. | ||
|
||
# gpg keys listed at https://github.com/nodejs/node | ||
RUN set -ex \ | ||
&& for key in \ | ||
9554F04D7259F04124DE6B476D5A82AC7E37093B \ | ||
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ | ||
0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93 \ | ||
FD3A5288F042B6850C66B31F09FE44734EB7990E \ | ||
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ | ||
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ | ||
; do \ | ||
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ | ||
done | ||
|
||
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ | ||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ | ||
&& gpg --verify SHASUMS256.txt.asc \ | ||
&& grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - \ | ||
&& tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ | ||
&& rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc | ||
|
||
# Django stuff | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
gettext \ | ||
postgresql-client libpq-dev \ | ||
--no-install-recommends && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN pip install psycopg2 django=="$DJANGO_VERSION" | ||
|
||
EXPOSE 8000 | ||
|
||
# CloudPebble stuff | ||
RUN npm install -g bower && echo '{"allow_root": true}' > ~/.bowerrc | ||
|
||
# Grab the toolchain | ||
RUN curl -o /tmp/arm-cs-tools.tar https://cloudpebble-vagrant.s3.amazonaws.com/arm-cs-tools-stripped.tar && \ | ||
tar -xf /tmp/arm-cs-tools.tar -C / && rm /tmp/arm-cs-tools.tar | ||
|
||
ADD requirements.txt /tmp/requirements.txt | ||
RUN pip install --no-cache-dir -r /tmp/requirements.txt | ||
|
||
ENV SDK_TWO_VERSION=2.9 | ||
|
||
# Install SDK 2 | ||
RUN mkdir /sdk2 && \ | ||
curl -L "https://s3.amazonaws.com/assets.getpebble.com/sdk3/sdk-core/sdk-core-${SDK_TWO_VERSION}.tar.bz2" | \ | ||
tar --strip-components=1 -xj -C /sdk2 | ||
|
||
ENV SDK_THREE_VERSION=3.8.1 | ||
|
||
# Install SDK 3 | ||
RUN mkdir /sdk3 && \ | ||
curl -L "https://s3.amazonaws.com/assets.getpebble.com/sdk3/release/sdk-core-${SDK_THREE_VERSION}.tar.bz2" | \ | ||
tar --strip-components=1 -xj -C /sdk3 | ||
|
||
COPY . /code | ||
WORKDIR /code | ||
|
||
# Bower is awful. | ||
RUN rm -rf bower_components && cd /tmp && python /code/manage.py bower install && mv bower_components /code/ | ||
|
||
RUN python manage.py compilemessages | ||
|
||
CMD ["sh", "docker_start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,30 +7,12 @@ support. | |
Getting Started | ||
--------------- | ||
|
||
The easiest way to get an instance of CloudPebble running is to use [Vagrant][]. | ||
The supplied virtual machine assumes [VirtualBox][], so you'll want to have that installed too. | ||
You will also need ports 8000 and 8001 to be available on your machine. | ||
The easiest way to get a fully-functional copy of CloudPebble is using Docker and Docker Compose. Instructions can | ||
be found in the [https://github.com/pebble/cloudpebble-composed](cloudpebble-composed) repo. | ||
|
||
With those set up, just clone the repo and run `vagrant up`: | ||
|
||
host:~/cloudpebble$ vagrant up | ||
|
||
After some waiting, you should have a functional instance running at [http://localhost:8000](http://localhost:8000). | ||
|
||
In general, you can then stop it with `vagrant halt`, start it with `vagrant up`, and restart it with `vagrant reload`. | ||
If you need to recreate the thing, you can use `vagrant destroy` and `vagrant up` again. No persistent data is stored | ||
in the VM, so doing this is safe. | ||
|
||
The server will be running in debug mode with autoreload enabled. However, the worker will not autoreload, so if you | ||
make changes that the worker should pick up on, you must restart it manually: | ||
|
||
|
||
host:~/cloudpebble$ vagrant ssh | ||
vagrant@precise32:~$ sudo restart cloudpebble-celery | ||
|
||
|
||
To locally override the configuration, create a file at `cloudpebble/settings_local.py` and set the appropriate values | ||
there. | ||
To locally override the configuration, you can create a file at `cloudpebble/settings_local.py` and set the | ||
appropriate values there. Setting environment variables also works. | ||
|
||
Note that you won't be able to set up integration with certain Pebble systems (e.g. Pebble SSO). This shouldn't usually | ||
matter; whenever these are used, an alternative route is provided and should be invoked in its absence. | ||
|
@@ -44,6 +26,4 @@ logical sense. Please avoid commits that fix typos in prior commits. | |
If a change is a significant amount of work, it would probably be worth creating an issue to discuss it first. Pull | ||
requests are not automatically accepted (though they usually are). | ||
|
||
[Vagrant]: http://www.vagrantup.com | ||
[VirtualBox]: http://virtualbox.org | ||
[support]: mailto:[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
sleep 1 | ||
if [ ! -z "$RUN_WEB" ]; then | ||
# Make sure the database is up to date. | ||
echo "Performing database migration." | ||
python manage.py syncdb --noinput | ||
python manage.py migrate | ||
|
||
python manage.py runserver 0.0.0.0:$PORT | ||
elif [ ! -z "$RUN_CELERY" ]; then | ||
sleep 2 | ||
C_FORCE_ROOT=true python manage.py celery worker --autoreload --loglevel=info | ||
else | ||
echo "Doing nothing!" | ||
exit 1 | ||
fi |
Submodule pebblejs
updated
51 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.