-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #210 from hasgeek/docker
Docker based development enviroment
- Loading branch information
Showing
4 changed files
with
97 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM ubuntu:14.04 | ||
|
||
# Configure apt | ||
|
||
RUN echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list | ||
RUN apt-get -y update | ||
|
||
RUN apt-get install -y build-essential git curl | ||
RUN apt-get install -y python python-dev python-setuptools | ||
RUN apt-get install -y software-properties-common python-software-properties | ||
RUN apt-get install -y libpq-dev libffi-dev libxml2-dev libxslt1-dev | ||
RUN apt-get install -y pandoc | ||
RUN apt-get install -y nodejs | ||
RUN easy_install-2.7 pip | ||
|
||
# add our requirements | ||
ADD requirements.txt /code/hasjob/requirements.txt | ||
|
||
# run pip install | ||
RUN pip2.7 install -r /code/hasjob/requirements.txt | ||
|
||
RUN pip2.7 uninstall dnspython3 -y | ||
RUN git clone https://github.com/rthalley/dnspython && cd dnspython && python setup.py install && cd .. && rm -rf dnspython | ||
|
||
# copy over our code | ||
ADD . /code/hasjob | ||
|
||
WORKDIR /code/hasjob/ | ||
|
||
EXPOSE 5000 | ||
EXPOSE 5432 |
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,24 @@ | ||
web: | ||
build: . | ||
command: python /code/hasjob/runserver.py & | ||
volumes: | ||
- .:/code/hasjob | ||
environment: | ||
SERVER_NAME: hasjob.docker.dev | ||
LASTUSER_SERVER: https://auth.hasgeek.com | ||
LASTUSER_CLIENT_ID: client-key-here | ||
LASTUSER_CLIENT_SECRET: client-secret-here | ||
links: | ||
- pg | ||
- redis | ||
ports: | ||
- "5000:5000" | ||
- "5432:5432" | ||
- "6379:6379" | ||
pg: | ||
image: postgres | ||
environment: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_USER: postgres | ||
redis: | ||
image: redis |
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,14 @@ | ||
# -*- coding: utf-8 -*- | ||
import os | ||
CACHE_TYPE = 'redis' | ||
CACHE_REDIS_HOST = 'redis' | ||
#: Database backend | ||
SQLALCHEMY_DATABASE_URI = 'postgres://postgres:postgres@pg/postgres' | ||
REDIS_URL = 'redis://redis:6379/0' | ||
SERVER_NAME = (os.environ.get('SERVER_NAME') or 'hasjob.docker.dev') + ':5000' | ||
#: LastUser server | ||
LASTUSER_SERVER = os.environ.get('LASTUSER_SERVER') or 'https://auth.hasgeek.com' | ||
#: LastUser client id | ||
LASTUSER_CLIENT_ID = os.environ.get('LASTUSER_CLIENT_ID') or '' | ||
#: LastUser client secret | ||
LASTUSER_CLIENT_SECRET = os.environ.get('LASTUSER_CLIENT_SECRET') or '' |