Code Monkey home page Code Monkey logo

RowSheet

© 2019-present, Alexander Kleinhans

All Rights Reserved

This is intended to be deployed in a highly automated fasion. Credentials should be placed in the .env file and kept out of commit history. Current setup deployes to three environments:

  1. Production
  2. Staging
  3. Local

Current setup allows multiple databases to be used with seamless migrations and in-between procedures.

Makefile Summary

You can run with the following files (also running intermediary steps).

#-------------------------------------------------------------------------------
# PRODUCTION
#-------------------------------------------------------------------------------
set_prod_env: ; # Setting production env vars...
deploy_production: set_prod_env ; # Running staging server...
create_production_superuser: set_staging_env; # Creating super-user on production server...
#-------------------------------------------------------------------------------
# STAGING 
#-------------------------------------------------------------------------------
set_staging_env: ; # Setting staging env vars...
deploy_staging: set_staging_env; # Running staging server...
create_staging_superuser: set_staging_env; # Creating super-user on staging server...
#-------------------------------------------------------------------------------
# LOCAL
#-------------------------------------------------------------------------------
run_local: ; # Running local server...
migrate_local_db: ; # Migrating local database...
make_local_migrations: ; # Migrating local database...
collect_static : ; # Collecting local static-files...
create_local_superuser: ; # Creating super-user for local server...
#-------------------------------------------------------------------------------
# PSQL (Database Command Line) 
#-------------------------------------------------------------------------------
psql_stage: ; # Connecting to staging database...
psql_prod: ; # Connecting to staging database...
psql_local: ; # Connecting to local database...
#-------------------------------------------------------------------------------
# DUMP (Database Dump to File) 
#-------------------------------------------------------------------------------
dump_stage_db: ; # Dumping staging database to local file...
dump_prod_db: ; # Dumping production database to local file...
#-------------------------------------------------------------------------------
# SYNC (Copy Database to Database)
#-------------------------------------------------------------------------------
sync_db_staging_from_prod: dump_prod_db ; # Syncing staging database with data from production...
sync_db_local_from_stage: dump_stage_db ; # Syncing local database with data from staging...
sync_db_local_from_prod: dump_prod_db ; # Syncing local database with data from production...

Note: Currently, all deployments (that use env vars) must be deployed through the makefile since credentials are stored in .env, but cannot be exported from that same file into local environments (i.e. what you would do with source env.sh or export KEY=VAL) because of the logic that must be placed in the .env file (which is NOT a bash file, but must be used to inject into local deployments at runtime through the Makefile. Overall it's a bit of a pain, but it's highly reproducable.

By RowSheet, LLC

Company: RowSheet, LLC

Contact: [email protected]

Website: rowsheet.com

Address: 312 Cheyenne St. Denver, CO 80403

Github

Z-Dawg's Projects

dcd icon dcd

Dockerized continuous delivery.

depix icon depix

Recovers passwords from pixelized screenshots

gin icon gin

Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

homobiles icon homobiles

(fake and gay ¯\_(ツ)_/¯) Homobiles landing page (Dockerized)

java_shit icon java_shit

Some old shit I did in java a long ass time ago

nginx-proxy icon nginx-proxy

Automated nginx proxy for Docker containers using docker-gen

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.