https://github.com/macagua/example_docker_postgresql_python
Examples for deploy a PostgreSQL server with database using Docker and query his data with Python
https://github.com/macagua/example_docker_postgresql_python
database deploy docker docker-compose postgres postgresql python python3 sql sql-query
Last synced: 3 months ago
JSON representation
Examples for deploy a PostgreSQL server with database using Docker and query his data with Python
- Host: GitHub
- URL: https://github.com/macagua/example_docker_postgresql_python
- Owner: macagua
- License: gpl-3.0
- Created: 2023-03-26T03:01:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-14T22:20:29.000Z (about 3 years ago)
- Last Synced: 2025-02-26T18:17:22.818Z (over 1 year ago)
- Topics: database, deploy, docker, docker-compose, postgres, postgresql, python, python3, sql, sql-query
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
================================
example_docker_postgresql_python
================================
Examples for deploy a PostgreSQL server with database using
Docker and query his data with Python.
Install
=======
Pre requirements for deploy with Docker, executing the following command:
::
$ sudo apt update && sudo apt upgrade
$ sudo apt install build-essential libpq-dev python3-dev
$ pip install -U pip
Define some values for the deploy into the ``.env`` file, executing the
following command:
::
$ cd example_docker_postgresql_python/
$ cp .env.example .env
$ nano .env
For deploy this software stack, you require the following software:
- `Docker Engine `_.
- `Docker Engine on Debian `_.
- `Docker Engine on Ubuntu `_.
- `Docker Compose `_.
Use it
======
For run this stack docker containers, executing the following command:
::
$ sudo docker compose up &
For stop this stack docker containers, executing the following command:
::
$ sudo docker compose stop