summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitjavalkar2017-12-11 12:14:33 +0530
committerankitjavalkar2018-01-04 11:37:20 +0530
commit268371d956dbe5cf349f1f6d8b3e4594a5c8c479 (patch)
tree649d60d38536d82bc31c2de27ae5ab4609adaf8f
parent8c9c7fdf227c7a107345c70fea4cf77cc550a10f (diff)
downloadonline_test-268371d956dbe5cf349f1f6d8b3e4594a5c8c479.tar.gz
online_test-268371d956dbe5cf349f1f6d8b3e4594a5c8c479.tar.bz2
online_test-268371d956dbe5cf349f1f6d8b3e4594a5c8c479.zip
Multiple changes:
- Remove requirement files placed in docker/Files - Modify tasks to dynamically copy requirement files into docker directory - Add java installation to Docker files
-rw-r--r--docker/Dockerfile_codeserver8
-rw-r--r--docker/Files/requirements-codeserver.txt6
-rw-r--r--docker/Files/requirements-common.txt9
-rw-r--r--docker/Files/requirements-py2.txt2
-rw-r--r--docker/Files/requirements-py3.txt2
-rw-r--r--online_test/.env.sample2
-rw-r--r--tasks.py6
7 files changed, 14 insertions, 21 deletions
diff --git a/docker/Dockerfile_codeserver b/docker/Dockerfile_codeserver
index 1bc93c2..d1cb1cc 100644
--- a/docker/Dockerfile_codeserver
+++ b/docker/Dockerfile_codeserver
@@ -2,7 +2,13 @@ FROM ubuntu:16.04
MAINTAINER FOSSEE <pythonsupport@fossee.in>
-RUN apt-get update -y && apt-get install git python3-pip vim libmysqlclient-dev sudo -y
+RUN apt-get update && \
+apt-get install -y software-properties-common && \
+echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
+add-apt-repository -y ppa:webupd8team/java && \
+apt-get update && \
+apt-get install -y oracle-java8-installer && \
+apt-get install git python3-pip vim libmysqlclient-dev sudo -y
VOLUME /Sites/online_test
diff --git a/docker/Files/requirements-codeserver.txt b/docker/Files/requirements-codeserver.txt
deleted file mode 100644
index e9585fa..0000000
--- a/docker/Files/requirements-codeserver.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-pytest
-python-decouple
-six
-requests
-tornado
-psutil
diff --git a/docker/Files/requirements-common.txt b/docker/Files/requirements-common.txt
deleted file mode 100644
index b4d2e5b..0000000
--- a/docker/Files/requirements-common.txt
+++ /dev/null
@@ -1,9 +0,0 @@
--r requirements-codeserver.txt
-invoke==0.21.0
-django==1.9.5
-django-taggit==0.18.1
-pytz==2016.4
-python-social-auth==0.2.19
-selenium==2.53.6
-coverage
-ruamel.yaml==0.15.23 \ No newline at end of file
diff --git a/docker/Files/requirements-py2.txt b/docker/Files/requirements-py2.txt
deleted file mode 100644
index 38777a1..0000000
--- a/docker/Files/requirements-py2.txt
+++ /dev/null
@@ -1,2 +0,0 @@
--r requirements-common.txt
-mysql-python==1.2.5
diff --git a/docker/Files/requirements-py3.txt b/docker/Files/requirements-py3.txt
deleted file mode 100644
index 3d13335..0000000
--- a/docker/Files/requirements-py3.txt
+++ /dev/null
@@ -1,2 +0,0 @@
--r requirements-common.txt
-mysqlclient==1.3.9
diff --git a/online_test/.env.sample b/online_test/.env.sample
index 908ec72..14fcf89 100644
--- a/online_test/.env.sample
+++ b/online_test/.env.sample
@@ -1,7 +1,7 @@
# Django settings
SECRET_KEY=dUmMy_s3cR3t_k3y
-DB_ENGINE=sqlite3
+#DB_ENGINE=mysql
#DB_NAME=name_of_db
#DB_USER=name_of_db_user
#DB_PASSWORD=db_password
diff --git a/tasks.py b/tasks.py
index d518374..6cbdecc 100644
--- a/tasks.py
+++ b/tasks.py
@@ -154,10 +154,16 @@ def stop(ctx, container=TARGET_CONTAINER_NAME, hide=True):
else:
print("** Docker container <{0}> not found **".format(container))
+# Docker compose based deployment
@task
def build(ctx):
run_as_cmd = run_as(OS_NAME)
+ copy_tree(
+ os.path.join(SCRIPT_DIR, 'requirements'),
+ os.path.join(SCRIPT_DIR, 'docker', 'Files')
+ )
+
base_build_cmd = "docker-compose build --no-cache"
cmd = get_cmd(run_as_cmd, base_build_cmd)
print ("** Building docker images **")