Giter VIP home page Giter VIP logo

mycc's Introduction

My Cookie Cutter

Starting place for a stack which includes Docker, NGINX, Django/FastAPI, and more...

Usage

For main branch (otherwise tack on: --checkout <branch_name>):

cookiecutter https://github.com/rileypeterson/mycc.git
# Enter in Parameters
cd <project_slug>
source aliases.sh
deploy

Future Thoughts

Requirements

  • Docker

Favicon generator

https://favicon.io/

Environment Files

  • Environment files are placed here:
    {{cookiecutter.project_slug}}/config/.dev.env
    {{cookiecutter.project_slug}}/config/.prod.env
    
  • They're ignored
  • If they already exist, they won't be overwritten when generating the cookiecutter
    • This is because Postgres auth won't work if the credentials are overwritten
  • See aliases.sh (Doesn't remove these files)

Handling Unrendered Files

  • The following files aren't rendered and django templates don't play nicely with cookiecutter:
      "_copy_without_render": [
        "{{cookiecutter.project_slug}}/pages/templates/pages/*.html"
      ]
    
  • Therefore, just use the following [[[[cookiecutter.project_name]]]] (no spaces) within those files
  • It'll be rendered by the post_gen_project.py hook
  • For now only cookiecutter.project_name will be recognized, but it would be straight forward to add more.

Docker removal (caution, this is just for testing)

prod-down
docker volume rm $(docker volume ls -q)
docker system prune -a --volumes
rm -rf <project_slug>
rm -rf .cookiecutter*

Note

You can have an NGINX config which blocks IPs like this:

    location / {
        proxy_pass         http://django;
        include ddns/allowed_ips.conf;
        deny all;
    }

and the certbot ssl exchange will still work. Thus, you don't need to leave the root domain exposed to 80/443.

mycc's People

Contributors

rileypeterson avatar

Watchers

 avatar

mycc's Issues

Improvements

  • Add EC2 Deploy Docs
  • Add info on NGINX IP block and cookiecutter option to handle it...
  • Remove wait time in deploy.sh
  • No email by default
  • Add instructions for Cloudflare strict origin setup

Fix host ip

Need to search and refine what this is... maybe add help for cookiecutter.

Prod build and deploy

  • Create the prod docker compose files and other necessary changes to deploy
  • Successful deployment

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.