Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zenithclown/flask-docker-template
Template for Flask and Docker
https://github.com/zenithclown/flask-docker-template
dependabot docker docker-compose dockerignore dotenv flake8 flask flask-restful gitattributes github-actions gitignore python rest-api template templates
Last synced: 8 days ago
JSON representation
Template for Flask and Docker
- Host: GitHub
- URL: https://github.com/zenithclown/flask-docker-template
- Owner: ZenithClown
- License: mit
- Created: 2021-06-20T18:45:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T21:24:03.000Z (6 months ago)
- Last Synced: 2024-10-12T00:40:00.417Z (about 1 month ago)
- Topics: dependabot, docker, docker-compose, dockerignore, dotenv, flake8, flask, flask-restful, gitattributes, github-actions, gitignore, python, rest-api, template, templates
- Language: Python
- Homepage:
- Size: 321 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
Flask Template
(python, docker, rest-api, flake8)
*A simple flask-template for REST-API design and implementation. Please include the Template Link in your design. Template includes
.gitignore
and.gitattributes
related to python and flask-api model. You can also update/change/deleteLICENSE
as required. Other files are related todocker
andflake8
(code linting) is included with basic setup. The template is built on GitHub, thus.github
directory is included with issue template, and workflows directory.**NOTE:** some optional usage, specifications, and helpful links are as below:
1. You can add GitHub Repository Badges from [Shields IO](https://shields.io/) - if this is a Public Repository;
2. TAB (size = 4) has been used for indentation.
3. `.github/workflows` is added however, it is recomended that you create your own workflows either using **GitHub Actions** or on your own.
4. Basic `docker` files are added for convention, modify it as per requirement. Recomended to delete the file, if not required.
5. The repository uses `markdown` instead of `rich text format`, so make necessary changes to file extension/type as required.
6. [Engine Configuration](https://docs.sqlalchemy.org/en/14/core/engines.html) for SQLAlchemy Documentation.## Quick Start Guide
Introduced in 2019, users can now create a repository from templates in GitHub. To do this, simply head over to any repository settings and enable "Template Repository" from the Options Menu. When creating a new repository from this template, you can just click on
Use this template
available in this repository (refer the picture below).### Creating a NEW Repository from Template
Template Repository is not limited to GitHub, and you can setup your own local-file structure for the same. The following describes the usage of
rsync
which is available in most linux distros, more information on rsync.```bash
# Note the use of rsync
rsync -rh ~/source/directory /destination/directory
```### Generate Template using `cookiecutter`
cookiecutter is an excellet module for creating projects from templates. The process can be done so locally (as shown below), or using command line utility
cookiecutter https://github.com/ZenithClown/flask-docker-template/tree/cookiecutter
by directly accesing the repository from GitHub.## Setup Information
Configure the application by setting
ENVIRONMENT VARIABLES
as required. Sample variables are provided in.env.bkp
, however for production grade application is is recomended that you set them at$PATH
. Start the application usingpython manage.py
which serves the port0.0.0.0:5000
by default.---
* Travis CI allows only 10k Credits on free-tier. The build might be old, please re-enable and check service if required.