From b5c42cd95d580018611f98d734872b62f14c3240 Mon Sep 17 00:00:00 2001 From: Malar Kannan Date: Tue, 1 Aug 2017 16:54:55 +0530 Subject: [PATCH] copying docker to image and building --- Dockerfile | 9 ++++++--- generate-docker.sh | 17 ++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5a8123e..7cafebc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ FROM alpine:3.6 -RUN apk add --no-cache --update python py-pip py-lxml && \ - pip install -r requirements.txt +ADD ./docker /walle-react +WORKDIR /walle-react -cmd 'gunicorn --bind 0.0.0.0:3000 wsgi' +RUN apk add --no-cache --update python py-pip py-lxml \ + && pip install -r requirements.txt + +CMD gunicorn --bind 0.0.0.0:$PORT wsgi diff --git a/generate-docker.sh b/generate-docker.sh index 3f2682a..c8b7757 100755 --- a/generate-docker.sh +++ b/generate-docker.sh @@ -1,12 +1,11 @@ #!/bin/bash -# if [ ! -d "docker" ]; then -# mkdir docker -# fi -# git submodule init -# git submodule update -# npm install -# npm run build -# cp -r build freespeech_walle ./*.py requirements.txt Dockerfile docker/ -cd docker/ +if [ ! -d "docker" ]; then + mkdir docker +fi +git submodule init +git submodule update +npm install +npm run build +cp -r build freespeech_walle ./*.py requirements.txt docker/ docker build -t walle-react .