diff --git a/Dockerfile b/Dockerfile index c8e36b9..cf088b9 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 +RUN pip install -r PyTexas/requirements.txt +COPY PyTexas /opt/PyTexas +WORKDIR /opt/PyTexas 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 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/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 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 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