From b2f59da1fcd03f1af64b737b43aaf2955463a4b6 Mon Sep 17 00:00:00 2001 From: Michael Kalish Date: Mon, 15 Oct 2018 12:58:19 -0400 Subject: [PATCH] Making Mapbox API Key and env variable --- .gitignore | 4 +- Dockerfile | 6 ++- ancfinder/database.sqlite | Bin 196608 -> 196608 bytes ancfinder/settings.py | 40 +++++++++++++++++- ancfinder_site/static/showdown.js | 1 - .../templates/ancfinder_site/index.html | 2 +- ancfinder_site/templates/base.html | 2 +- ancfinder_site/views.py | 2 + deployment/docker-compose.yml | 27 ------------ docker-compose.yml | 14 +++--- nginx.conf | 9 +++- .../nginx.conf => nginx.production.conf | 0 run.sh | 5 +++ sample.env | 9 ++++ 14 files changed, 77 insertions(+), 44 deletions(-) delete mode 120000 ancfinder_site/static/showdown.js delete mode 100644 deployment/docker-compose.yml rename deployment/nginx.conf => nginx.production.conf (100%) create mode 100644 run.sh create mode 100644 sample.env diff --git a/.gitignore b/.gitignore index b62dcfd..988cb61 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ update_anc_database_creds.py ancfindersite/database.sqlite data +user_local_environment.yaml .DS_Store *~ @@ -17,4 +18,5 @@ __pycache__ .Python .python-version lib -include \ No newline at end of file +include +anc_finder_sql \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e49414d..c86364e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,14 +8,16 @@ RUN pip install -r requirements.txt COPY ./ancfinder /srv/app/ancfinder COPY ./ancfinder_site /srv/app/ancfinder_site COPY ./manage.py /srv/app/manage.py +COPY ./run.sh /srv/app/run.sh +RUN chmod u+x /srv/app/run.sh +VOLUME /srv/app/static EXPOSE 8000 - # Ensure that the model and database are correctly mapped # RUN python3 manage.py makemigrations # RUN python3 manage.py migrate # Run these when the container launches -CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file +CMD ["./run.sh"] \ No newline at end of file diff --git a/ancfinder/database.sqlite b/ancfinder/database.sqlite index 3d4fa81457fe5833dbf349d30957bcd92968c75e..4925e2f26e0df3bdbd612f38d6ec85341063f690 100644 GIT binary patch delta 1705 zcmZ|Py>1gh5C?GEaXttp7xN7XhllSbr=9(nosC41yR#c!!|!pXphSY#phtNJIv#*F zQaVIS!|n(|EbrCx)9l{ue`d9stX7jxN5hNH$IbS|pgR2he)(ZJ{JI={DLZsC^ry(D zimISVTU+jK6=zN>vgL`D0gBV^L1p><#w#wd|fH8%Wbcs-sLXJ%nG z`y_(iT6iU-%@Yoq6}%ME^boIHfEVLw7f-5tjP=^Vb7?d0A;|3ESt72@JRDahpt2f3 zNV7>g6%BJB12Zx8rV&DH5uOT}_Yg~Hp%ju!Q91}o8F-Qi))J(cg6m1+3PT_wI2Mx& zTOyuX9;G=^FLh5`MBs320 z3u)F#Cj*$;7#*W`FB!e~HzU_Z#8+(Mh&s3{WZpxRj-P!;NSh~`hz;Bp(&%n8Hu-v5^)%)7Pu?$ofPy!sUQ0mA z11w3bCn=|59%6`Ck5kU&JfQR2qtR%q`aY_DR9Ba?!^wwl*Z+bw$BdRe!RzU6b?VOC z%A8CLdol1zNjE^8VS$%Q+9IJSE?9Um-R;wtngQc2Aw1VH^D+^(Find Your ANC {% endblock %} {% block base_scripts %}