From 5c87c3a7d76c7c22d48841199aefb81bf4d6d9cb Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Thu, 1 Oct 2015 18:02:23 +0000 Subject: [PATCH] Fixes on deployment --- TODO.md | 2 ++ orchestra/management/commands/setuplog.py | 2 +- scripts/containers/Dockerfile | 28 +++++++++++++++++------ scripts/containers/deploy.sh | 2 ++ 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/TODO.md b/TODO.md index e0165e31..8a940526 100644 --- a/TODO.md +++ b/TODO.md @@ -417,3 +417,5 @@ Once I did this, all of my "autocomplete=off" elements were respected by Chrome. http://makandracards.com/makandra/24933-chrome-34+-firefox-38+-ie11+-ignore-autocomplete-off + +mkhomedir_helper or create ssh homes with bash.rc and such diff --git a/orchestra/management/commands/setuplog.py b/orchestra/management/commands/setuplog.py index 99bd4c9f..2e6d5f35 100644 --- a/orchestra/management/commands/setuplog.py +++ b/orchestra/management/commands/setuplog.py @@ -38,7 +38,7 @@ class Command(BaseCommand): 'LOGGING': settings_parser.Remove(), }) setuplogrotate = textwrap.dedent("""\ - mkdir %(log_dir)s && chown -reference=%(site_dir)s %(log_dir)s + mkdir %(log_dir)s && chown --reference=%(site_dir)s %(log_dir)s touch %(log_path)s chown --reference=%(log_dir)s %(log_path)s echo '%(log_dir)s/*.log { diff --git a/scripts/containers/Dockerfile b/scripts/containers/Dockerfile index 6be3aa33..9f9b3804 100644 --- a/scripts/containers/Dockerfile +++ b/scripts/containers/Dockerfile @@ -1,14 +1,28 @@ FROM debian:latest -RUN apt-get -y update && apt-get install -y git screen sudo python3 python3-pip wget curl dnsutils rsyslog nano ssh-client +RUN apt-get -y update && apt-get install -y \ + git \ + screen \ + sudo \ + python3 \ + python3-pip \ + wget \ + curl \ + dnsutils \ + rsyslog \ + nano \ + ssh-client \ + python3-psycopg2 \ + postgresql \ + nginx-full \ + uwsgi \ + uwsgi-plugin-python3 -RUN curl https://raw.githubusercontent.com/glic3rinu/django-orchestra/master/orchestra/bin/orchestra-admin | bash -s install_requirements +RUN export TERM=xterm; curl https://raw.githubusercontent.com/glic3rinu/django-orchestra/master/orchestra/bin/orchestra-admin | bash -s install_requirements -RUN apt-get -y install python3-psycopg2 postgresql nginx-full uwsgi uwsgi-plugin-python3 RUN apt-get clean -RUN useradd orchestra --password 'orchestra' && \ - mkdir /home/orchestra && \ - chmod 750 /home/orchestra && \ - chown orchestra:orchestra /home/orchestra && \ +RUN useradd orchestra --shell /bin/bash && \ + echo "orchestra:orchestra" | chpasswd + mkhomedir_helper orchestra && \ adduser orchestra sudo diff --git a/scripts/containers/deploy.sh b/scripts/containers/deploy.sh index 6c73bbcb..9732bb4a 100644 --- a/scripts/containers/deploy.sh +++ b/scripts/containers/deploy.sh @@ -3,6 +3,8 @@ set -ue +# bash <( curl https://raw.githubusercontent.com/glic3rinu/django-orchestra/master/scripts/containers/deploy.sh ) + function main () { bold=$(tput -T ${TERM:-xterm} bold) normal=$(tput -T ${TERM:-xterm} sgr0)