Giter VIP home page Giter VIP logo

tnris / lake-gallery Goto Github PK

View Code? Open in Web Editor NEW
4.0 8.0 0.0 85.98 MB

Web Map for exploring the history of Texas lakes

Home Page: https://lake-gallery.tnris.org/

License: MIT License

Makefile 0.09% Python 11.93% CSS 11.58% HTML 6.70% JavaScript 69.41% Shell 0.17% Dockerfile 0.12%
django python3 tnris twdb tnris-is texas lakes water javascript texas-lakes lake-gallery gdal aws-cli python

lake-gallery's Introduction

Texas Lake Gallery

Web Map for exploring the history of Texas lakes

cd ./lakegallery as all commands are run from the ~/lake-gallery/lakegallery/ directory

Setup

Built with:

  • Python 3.5 (virtual environment suggested)
  • PostgreSQL 9.5.2
    • Amazon RDS Instance
  • GDAL & GDAL Python & GDAL Devel
  • Django
  • For data scripts, you probably want to use some form of python virtual env manager to maintain an isolated environment. A good run-down of the options can be found in The Hitchiker's Guide to Python. A recommended setup is virtualenv + virtualenvwrapper. Anaconda is an alternative but it has not been successfully tested.
  1. Enable your virtual environment. Example- workon lakegallery (for virtualenv wrapper)
  2. Upgrade pip using pip install --upgrade pip
  3. install python requirements pip install -r requirements.txt
  4. cd into the secrets folder of the repo cd ./lakegallery/lakegallery/secrets/
  5. place a copy vault-password.txt into the secrets folder of the repo (You might need to change spaces to newlines) and run make pull-secrets

or

  1. make a copy of the set_env-SAMPLE.sh, remove the '-SAMPLE' from the name, and manually fill in the values. Then run . set_env.sh from said secrets folder

You will need to use your configured AWS CLI when working locally. If not already set up, you will need to install the AWS CLI and configure it with an access key and secret key.

Develop

  1. Run the app:

run make run-dev to run the app locally and reference local static files. Will be available at localhost:8000. Media files will still be referenced from the production S3 bucket.

or

run make run-dev-local to run the app locally and reference local static files if API (api.tnris.org) is already running locally. Will be available at localhost:8030. Media files will still be referenced from the production S3 bucket. This command is for testing contact forms since they use the API.

  1. run make run-tests to run the unit tests for the map application

Local Production Build

In production, the app pulls/references all static files for all apps from the configured S3 bucket. Run Deployment Prep section's Step 1 to upload/push local static files into S3. VERY DANGEROUS if app is currently deployed as you will be overwriting the production static files!

  1. run make run-prod to run the app locally and reference prod s3 static files. Will be available at localhost:8000.

Deployment Prep

  1. run make push-static to compile all static files and overwrite those in S3. VERY DANGEROUS if app is currently deployed as you will be overwriting the production static files!
  2. pip freeze > requirements.txt to save dependencies
  3. head over to the deployments repo to execute the actual application deployment

Notes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.