blockpy-edu / blockpy

Blockly that's more Python than JavaScript, powered with Skulpt
Apache License 2.0
403 stars 133 forks source link

Dockerfile for blockpy #22

Closed psychemedia closed 4 years ago

psychemedia commented 8 years ago

I tried to make a start on a Dockerfile for blockpy so it can be run as a container, but whilst everything seems to compile and the server appears to start, I can't actually see Blockpy in a browser, so I'm presumably doing s/thing wrong s/where.

FWIW, here's where I'm at to date:

FROM python:2

MAINTAINER tony.hirst@gmail.com

RUN apt-get update && apt-get install -y unzip wget openjdk-7-jre-headless

RUN apt-get clean

RUN wget https://github.com/RealTimeWeb/blockpy/archive/master.zip -O blockpy-master.zip 
RUN unzip blockpy-master.zip  && rm blockpy-master.zip

RUN wget https://github.com/google/closure-library/archive/master.zip -O closure-library-master.zip
RUN unzip closure-library-master.zip

RUN rm -r blockpy-master/closure-library
RUN mv /closure-library-master/ /blockpy-master/closure-library/

WORKDIR /blockpy-master/blockly
RUN pip install GitPython
RUN python build.py

WORKDIR /blockpy-master/skulpt
RUN python skulpt.py dist

WORKDIR /blockpy-master/server
RUN pip install flask Flask-SQLAlchemy flask-admin flask-security flask-script sqlalchemy pylti pyOpenSSL
RUN pip install Flask-Assets
RUN pip install lxml pygments

RUN mkdir -p /blockpy-master/server/log/student_interactions/
RUN python manage.py reset_db

#Need nginx to start a server and run with the blockpy.html file as index.html?
EXPOSE 5000
CMD ["python", "manage.py","runserver"]
acbart commented 8 years ago

Hm, did you access the right port? I believe that the default file sets it to 5001 or something. https://github.com/RealTimeWeb/Blockpy-Server/blob/master/config.py#L64

FYI, I'm going to be pushing a major update sometime in the next few weeks that rearchitectures the BlockPy project (both the client side and the server side) along with the CORGIS project and a few of the other associated projects we have from my lab. I'm not sure how that will dovetail with this effort; might be a simple update from your perspective, might be more depending on what your use case is?