Updated docker files
This commit is contained in:
17
docker/build.sh
Executable file
17
docker/build.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
echo $DIR
|
||||||
|
|
||||||
|
if [[ $1 == 'pro' || $1 == 'dev' ]]; then
|
||||||
|
# Copy requirements.txt into pro folder
|
||||||
|
cp ../requirements.txt $1/requirements.txt
|
||||||
|
# Build image
|
||||||
|
docker build -t armadillica/pillar_$1 $1
|
||||||
|
# Remove requirements.txt
|
||||||
|
rm $1/requirements.txt
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "POS. Your options are 'pro' or 'dev'"
|
||||||
|
fi
|
@@ -1,11 +1,10 @@
|
|||||||
FROM ubuntu
|
FROM ubuntu:14.04
|
||||||
MAINTAINER Francesco Siddi <francesco@blender.org>
|
MAINTAINER Francesco Siddi <francesco@blender.org>
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
python \
|
python \
|
||||||
python-dev \
|
python-dev \
|
||||||
python-pip \
|
python-pip \
|
||||||
git \
|
|
||||||
nano \
|
nano \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
@@ -19,28 +18,24 @@ RUN add-apt-repository ppa:mc3man/trusty-media \
|
|||||||
&& apt-get update && apt-get install -y \
|
&& apt-get update && apt-get install -y \
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
|
||||||
|
RUN mkdir -p /data/git/pillar \
|
||||||
RUN mkdir /data \
|
&& mkdir -p /data/storage/shared \
|
||||||
&& mkdir /data/www \
|
&& mkdir -p /data/storage/pillar \
|
||||||
&& mkdir /data/www/pillar \
|
&& mkdir -p /data/config \
|
||||||
&& mkdir /data/dev \
|
&& mkdir -p /data/storage/logs
|
||||||
&& mkdir /data/dev/pillar \
|
|
||||||
&& mkdir /storage \
|
|
||||||
&& mkdir /storage/shared \
|
|
||||||
&& mkdir /storage/pillar \
|
|
||||||
&& mkdir /data/config \
|
|
||||||
&& mkdir /storage/logs
|
|
||||||
|
|
||||||
RUN git clone https://github.com/armadillica/pillar.git /data/www/pillar
|
|
||||||
|
|
||||||
RUN pip install virtualenv \
|
RUN pip install virtualenv \
|
||||||
&& virtualenv /data/venv
|
&& virtualenv /data/venv
|
||||||
RUN . /data/venv/bin/activate && pip install -r /data/www/pillar/requirements.txt
|
|
||||||
|
|
||||||
VOLUME /data/dev/pillar
|
ENV PIP_PACKAGES_VERSION = 1
|
||||||
|
ADD requirements.txt /requirements.txt
|
||||||
|
|
||||||
|
RUN . /data/venv/bin/activate && pip install -r /requirements.txt
|
||||||
|
|
||||||
|
VOLUME /data/git/pillar
|
||||||
VOLUME /data/config
|
VOLUME /data/config
|
||||||
VOLUME /storage/shared
|
VOLUME /data/storage/shared
|
||||||
VOLUME /storage/pillar
|
VOLUME /data/storage/pillar
|
||||||
|
|
||||||
ENV MONGO_HOST mongo_pillar
|
ENV MONGO_HOST mongo_pillar
|
||||||
|
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. /data/venv/bin/activate && python /data/dev/pillar/pillar/manage.py runserver
|
. /data/venv/bin/activate && python /data/git/pillar/pillar/manage.py runserver
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# EnableSendfile on
|
# EnableSendfile on
|
||||||
XSendFile on
|
XSendFile on
|
||||||
XSendFilePath /storage/pillar
|
XSendFilePath /data/storage/pillar
|
||||||
|
|
||||||
ServerAdmin webmaster@localhost
|
ServerAdmin webmaster@localhost
|
||||||
DocumentRoot /var/www/html
|
DocumentRoot /var/www/html
|
||||||
@@ -34,10 +34,10 @@
|
|||||||
WSGIDaemonProcess pillar
|
WSGIDaemonProcess pillar
|
||||||
WSGIPassAuthorization On
|
WSGIPassAuthorization On
|
||||||
|
|
||||||
WSGIScriptAlias / /data/dev/pillar/pillar/runserver.wsgi \
|
WSGIScriptAlias / /data/git/pillar/pillar/runserver.wsgi \
|
||||||
process-group=pillar application-group=%{GLOBAL}
|
process-group=pillar application-group=%{GLOBAL}
|
||||||
|
|
||||||
<Directory /data/dev/pillar/pillar>
|
<Directory /data/git/pillar/pillar>
|
||||||
<Files runserver.wsgi>
|
<Files runserver.wsgi>
|
||||||
Require all granted
|
Require all granted
|
||||||
</Files>
|
</Files>
|
||||||
|
@@ -5,7 +5,6 @@ RUN apt-get update && apt-get install -y \
|
|||||||
python \
|
python \
|
||||||
python-dev \
|
python-dev \
|
||||||
python-pip \
|
python-pip \
|
||||||
git \
|
|
||||||
vim \
|
vim \
|
||||||
nano \
|
nano \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
@@ -23,16 +22,11 @@ RUN add-apt-repository ppa:mc3man/trusty-media \
|
|||||||
&& apt-get update && apt-get install -y \
|
&& apt-get update && apt-get install -y \
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
|
||||||
RUN mkdir /data \
|
RUN mkdir -p /data/git/pillar \
|
||||||
&& mkdir /data/www \
|
&& mkdir -p /data/storage/shared \
|
||||||
&& mkdir /data/www/pillar \
|
&& mkdir -p /data/storage/pillar \
|
||||||
&& mkdir /data/dev \
|
&& mkdir -p /data/config \
|
||||||
&& mkdir /data/dev/pillar \
|
&& mkdir -p /data/storage/logs
|
||||||
&& mkdir /storage \
|
|
||||||
&& mkdir /storage/shared \
|
|
||||||
&& mkdir /storage/pillar \
|
|
||||||
&& mkdir /data/config \
|
|
||||||
&& mkdir /storage/logs
|
|
||||||
|
|
||||||
ENV APACHE_RUN_USER www-data
|
ENV APACHE_RUN_USER www-data
|
||||||
ENV APACHE_RUN_GROUP www-data
|
ENV APACHE_RUN_GROUP www-data
|
||||||
@@ -43,18 +37,19 @@ ENV APACHE_LOCK_DIR /var/lock/apache2
|
|||||||
|
|
||||||
RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
|
RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
|
||||||
|
|
||||||
RUN git clone https://github.com/armadillica/pillar.git /data/www/pillar
|
|
||||||
|
|
||||||
RUN pip install virtualenv \
|
RUN pip install virtualenv \
|
||||||
&& virtualenv /data/venv
|
&& virtualenv /data/venv
|
||||||
|
|
||||||
RUN . /data/venv/bin/activate \
|
ENV PIP_PACKAGES_VERSION = 1
|
||||||
&& pip install -r /data/www/pillar/requirements.txt
|
ADD requirements.txt /requirements.txt
|
||||||
|
|
||||||
VOLUME /data/dev/pillar
|
RUN . /data/venv/bin/activate \
|
||||||
|
&& pip install -r /requirements.txt
|
||||||
|
|
||||||
|
VOLUME /data/git/pillar
|
||||||
VOLUME /data/config
|
VOLUME /data/config
|
||||||
VOLUME /storage/shared
|
VOLUME /data/storage/shared
|
||||||
VOLUME /storage/pillar
|
VOLUME /data/storage/pillar
|
||||||
|
|
||||||
ENV MONGO_HOST mongo_pillar
|
ENV MONGO_HOST mongo_pillar
|
||||||
|
|
||||||
|
@@ -218,7 +218,7 @@ client = MongoClient(app.config['MONGO_HOST'], 27017)
|
|||||||
db = client.eve
|
db = client.eve
|
||||||
bugsnag.configure(
|
bugsnag.configure(
|
||||||
api_key = app.config['BUGSNAG_API_KEY'],
|
api_key = app.config['BUGSNAG_API_KEY'],
|
||||||
project_root = "/date/dev/pillar/pillar",
|
project_root = "/data/dev/pillar/pillar",
|
||||||
)
|
)
|
||||||
handle_exceptions(app)
|
handle_exceptions(app)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user