/Py_Init

A initial project setup for a Dockerized Python Application using Git Actions for CI/CD

Primary LanguageDockerfile

Starter Python Project

This is a starter Python repo, for a dockerized cloud Python application, using Git Actions for Continuos Integration. It uses docker-compose with a PostgreSQL service container.

Setup

# Start a clean python environment
pipenv shell

# Install dependencies
pipenv install --dev

# Setup pre-commit and pre-push hooks
pipenv run pre-commit install -t pre-commit
pipenv run pre-commit install -t pre-push

Workflows

Local

Running directly in the development computer.

Test

# Executes all the tests
py.test

Run

# Executes the module with argument 5
python -m py_start 5

Container

Running using containers in the development computer.

Buid Image

# Builds the application docker images
docker-compose build

Test

docker-compose run --service-ports --rm test 5

Run

docker-compose run --service-ports --rm dev 5