Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mr-hrr-harry/flask_postgres
This is a simple repo to run the flask app and connect it to DB
https://github.com/mr-hrr-harry/flask_postgres
docker docker-compose flask kubernetes minikube postgres
Last synced: 21 days ago
JSON representation
This is a simple repo to run the flask app and connect it to DB
- Host: GitHub
- URL: https://github.com/mr-hrr-harry/flask_postgres
- Owner: mr-hrr-harry
- Created: 2024-08-22T18:10:11.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-08-28T17:35:11.000Z (3 months ago)
- Last Synced: 2024-10-16T12:21:13.776Z (about 1 month ago)
- Topics: docker, docker-compose, flask, kubernetes, minikube, postgres
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker file run
**pre-requisites**
docker
For docker refer: [Docker Notes](https://mr-horror-harry.notion.site/Harry-s-Docker-Docs-d252b1bba2ab42e084fcb7b2f970cf2b)
1. run a postgres docker container with required env variables set
2. `docker run -d --rm --name postgres_container -e POSTGRES_USER= -e POSTGRES_PASSWORD= -e POSTGRES_DB=dbname -p :5432 postgres`
3. `docker build -t .`
4. `docker run -d -e DB_URL= -p 8080:8000 `
# docker compose run
**pre-requisites**
docker compose (installed with docker)
For docker compose refer: [Docker compose Notes](https://mr-horror-harry.notion.site/Harry-s-Docker-compose-Docs-1d41f455fd0d442cb3c1c59fd3c06358)
1. run the docker compose file using the command
`docker compose up`
# kube as service
**pre-requisites**
minikube
kubectl
For kubenetes refer: [Kubernetes Notes](https://mr-horror-harry.notion.site/Harry-s-K8s-Docs-4147ad7e5f264ee181bd016a6662bde2)
1. move into the kube_files folder
2. run the kube_setup.sh files with required file permissions
`./kube_setup.sh`