From 7cad6e811d4e536e886500535c2447363818741f Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Fri, 15 Feb 2019 15:26:04 +0000 Subject: [PATCH 1/4] cleanup instructions after repo consolidation --- Dockerfile | 12 +++--------- README.md | 18 +----------------- requirements.txt | 39 --------------------------------------- 3 files changed, 4 insertions(+), 65 deletions(-) delete mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index c8e36b9..1c6b66f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,15 +2,9 @@ FROM python:3.6.8 ENV PYTHONUNBUFFERED 1 ENV SECRET_KEY="an insecure development secret" -ENV FRONTEND_DIR="/opt/PyTexas2019/" -COPY requirements.txt /tmp/requirements.txt -RUN pip install -r /tmp/requirements.txt - -COPY Django-Conference /opt/DjangoConference -RUN pip install -e /opt/DjangoConference - -COPY PyTexasBackend /opt/PyTexasBackend -WORKDIR /opt/PyTexasBackend +COPY PyTexas /opt/PyTexas +WORKDIR /opt/PyTexas +RUN pip install -r requirements.txt RUN python manage.py migrate diff --git a/README.md b/README.md index 10142c1..6844e54 100644 --- a/README.md +++ b/README.md @@ -6,22 +6,6 @@ The pytexas.org website, dockerized. 0. Install [Docker](https://docs.docker.com/install/) 0. Install [docker-compose](https://docs.docker.com/compose/install/) -0. Clone the necessary repos: - * `git clone git@github.com:pytexas/PyTexasBackend.git` - * `git clone git@github.com:pytexas/PyTexas2019.git` - * `git clone git@github.com:pizzapanther/Django-Conference.git` +0. Clone the repos `git clone git@github.com:pytexas/PyTexas.git` 0. `docker-compose up` 0. Visit - -## Weirdness - -The dependencies for the backend are included in this repo as `requirements.in` -and `requirements.txt` because pipenv is overkill for dependencies inside -Docker containers. - -To rebuild the `requirements.txt` file after modifying `requirements.in`: - -``` -$ pip install pip-tools -$ pip-compile requirements.in -``` diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 04052cd..0000000 --- a/requirements.txt +++ /dev/null @@ -1,39 +0,0 @@ -# -# This file is autogenerated by pip-compile -# To update, run: -# -# pip-compile --output-file requirements.txt requirements.in -# -aniso8601==3.0.2 # via graphene -certifi==2018.11.29 # via requests -chardet==3.0.4 # via requests -click==7.0 # via djzen -dj-database-url==0.5.0 -django-bmemcached==0.2.3 -django-filter==1.0.4 -django-flat-responsive==2.0 -django==2.0.9 -djangorestframework==3.9.1 -djzen==17.12.5 -graphene-django==2.0.dev2017073101 -graphene==2.1.2 -graphql-core==2.1 # via graphene, graphql-relay -graphql-relay==0.4.5 # via graphene -idna==2.8 # via requests -iso8601==0.1.12 # via graphene-django -pillow==5.4.1 -promise==2.2.1 # via graphene, graphene-django, graphql-core, graphql-relay -psycopg2-binary==2.7.7 -python-binary-memcached==0.28.0 -pytz==2018.9 # via django -raven==6.10.0 -requests==2.21.0 # via stripe -rx==1.6.1 # via graphql-core -singledispatch==3.4.0.3 # via graphene-django -six==1.12.0 # via graphene, graphene-django, graphql-core, graphql-relay, promise, python-binary-memcached, singledispatch -stripe==2.20.3 -tornado==5.1.1 -typing==3.6.6 # via python-binary-memcached -uhashring==1.1 # via python-binary-memcached -urllib3==1.24.1 # via requests -whitenoise==4.1.2 # via djzen From 14f51ff2accc6e9bb3cbc584f1502fe82f3f234f Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Fri, 15 Feb 2019 15:37:00 +0000 Subject: [PATCH 2/4] cleanup after repo consolidation --- Dockerfile | 2 +- Dockerfile.static | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c6b66f..cf088b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM python:3.6.8 ENV PYTHONUNBUFFERED 1 ENV SECRET_KEY="an insecure development secret" +RUN pip install -r PyTexas/requirements.txt COPY PyTexas /opt/PyTexas WORKDIR /opt/PyTexas -RUN pip install -r requirements.txt RUN python manage.py migrate diff --git a/Dockerfile.static b/Dockerfile.static index 3f2d571..faa2527 100644 --- a/Dockerfile.static +++ b/Dockerfile.static @@ -1,10 +1,10 @@ From node:8.9.4 as static -COPY PyTexas2019 /opt/PyTexas2019 +ENV PATH=$PATH:./node_modules/.bin +COPY PyTexas /opt/PyTexas -WORKDIR /opt/PyTexas2019 +WORKDIR /opt/PyTexas RUN set -x \ && npm install -g npm@latest \ - && npm install -g gulp-cli parcel-bundler \ && npm install From 0bfccef8e41b0210419d398ffbe170f73e1f7c4f Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Fri, 15 Feb 2019 15:37:36 +0000 Subject: [PATCH 3/4] cleanup after repo consolidation --- requirements.in | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 requirements.in diff --git a/requirements.in b/requirements.in deleted file mode 100644 index 11bf3b3..0000000 --- a/requirements.in +++ /dev/null @@ -1,15 +0,0 @@ -djzen -dj-database-url -django-bmemcached -django-flat-responsive -djangorestframework -python-binary-memcached -psycopg2-binary -raven -stripe -tornado -graphene-django==2.0.dev2017073101 -django-filter==1.0.4 -graphene==2.1.2 -django==2.0.9 -pillow From c1fb4151a366e0dc89db6f92617b50e18fa95dc0 Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Fri, 15 Feb 2019 15:43:52 +0000 Subject: [PATCH 4/4] cleanup after repo consolidation --- docker-compose.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 2d27153..14496be 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,8 +6,7 @@ services: context: . command: python manage.py runserver 0.0.0.0:8000 volumes: - - ./PyTexasBackend:/opt/PyTexasBackend - - ./PyTexas2019:/opt/PyTexas2019 + - ./PyTexas:/opt/PyTexas ports: - "8000:8000" @@ -17,5 +16,5 @@ services: dockerfile: Dockerfile.static command: gulp watch volumes: - - ./PyTexas2019:/opt/PyTexas2019 - - /opt/PyTexas2019/node_modules + - ./PyTexas:/opt/PyTexas + - /opt/PyTexas/node_modules