Skip to content

Instantly share code, notes, and snippets.

@lighta971
Last active August 29, 2015 14:05
Show Gist options
  • Save lighta971/d83c89367416a9bf1f54 to your computer and use it in GitHub Desktop.
Save lighta971/d83c89367416a9bf1f54 to your computer and use it in GitHub Desktop.

Build

docker build --rm -t lingoback .

Install

cd lingo-back
docker run -it -v $(pwd):/app -p 9000 lingoback /bin/bash docker/install.sh 

Server

cd lingo-back
docker run -it -v $(pwd):/app -p 9000 lingoback /bin/bash docker/server.sh or [/bin/bash -c "source activate && fab server"]
FROM ubuntu:precise
MAINTAINER Aurel <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -qq && \
apt-get -y install git-core chromium-browser\
build-essential python-setuptools \
python-dev python-pip \
libmysqlclient-dev \
libxml2-dev libxslt1-dev \
memcached libmemcached-dev \
python-software-properties && \
add-apt-repository ppa:chris-lea/node.js && apt-get update -qq && \
apt-get -y install nodejs && \
apt-get autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.npm /var/cache/apt/* && \
npm cache clear
RUN easy_install pip
RUN pip install uwsgi
RUN pip install -U pip && \
pip install --upgrade pip && \
pip install paramiko==1.10 && \
pip install fabric && \
pip install virtualenv
# Append to $PATH variable.
RUN echo '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bash_profile
RUN npm install -g bower grunt-cli karma-cli phantomjs
RUN mkdir -p /app/.virtualenv && \
virtualenv /app/.virtualenv
ENV LOCAL_DB_HOST db
EXPOSE 9000
VOLUME /app
WORKDIR /app
web:
image: lingoback
command: /bin/bash /app/docker/server.sh
ports:
- "9000"
volumes:
- .:/app
links:
- db
db:
image: lighta971/phpmyadmin #Use another
ports:
- "81:80"
#!/bin/bash
set -e # stop on error
virtualenv .virtualenv
source .virtualenv/bin/activate
pip install -r requirements.txt
bower install --config.interactive=false --allow-root
npm install
grunt dist
#!/bin/bash
source .virtualenv/bin/activate
fab server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment