Public Repository

Last pushed: a year ago
Short Description
python3-postgres environment for bitbucket piplines
Full Description

Example piplines settings for Python3.5/Django project with PostgreSQL database.

This is a sample build configuration for Python.

Check our guides at for more examples.

Only use spaces to indent your .yml configuration.


You can specify a custom docker image from Docker Hub as your build environment.

image: h1hg/python3-postgres

- step:
    script: # Modify the commands below to build your repository.
      - /etc/init.d/postgresql start
      - sudo -u postgres psql -c "CREATE USER ${DB_USER} WITH ENCRYPTED PASSWORD '${DB_PASS}' SUPERUSER;"
      - sudo -u postgres psql -c "CREATE DATABASE ${DB_NAME} OWNER ${DB_USER};"
      - pip install -r requirements.txt
      - python migrate
      - python test

You can specify environment variables in your bitbucket repo settings like:
DB_PORT 5432
DB_NAME tests
DB_USER test
DB_PASS test

Don't change DB_HOST and DB_PORT for this image.

Thanks 'valtechcanada' for shared info.

Docker Pull Command