Skip to content

Commit

Permalink
Add dockerfile for easier local deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ShikherVerma committed Sep 1, 2017
1 parent 1bbbc53 commit 4605dfb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ files/*
.sass-cache
static/css/*
!static/css/.keep

# Exclude flask config file as it contains secret keys
instance/config.py
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu:latest
MAINTAINER Shikher Verma "[email protected]"
RUN apt-get update -y --fix-missing
RUN apt-get install -y python python-pip python-dev build-essential git nodejs npm ruby ruby-dev
# Install Dependencies
RUN \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 && \
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' > /etc/apt/sources.list.d/mongodb.list && \
apt-get update && \
apt-get install -y mongodb-org && \
rm -rf /var/lib/apt/lists/*
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
RUN npm install --verbose
RUN gem install sass
EXPOSE 5000
CMD ["./docker-start.sh"]
8 changes: 8 additions & 0 deletions docker-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

mkdir -p /data/db
mongod &
mkdir instance
echo 'DEBUG=False' >> instance/config.py
echo "SECRET_KEY='?\xbf,\xb4\x8d\xa3<\x9c\xb0@\x0f5\xab,w\xee\x8d$0\x13\x8b83'" >> instance/config.py
python wizard.py

0 comments on commit 4605dfb

Please sign in to comment.