Public Repository

Last pushed: a year ago
Short Description
A python3.5 image with PostgreSQL to use with Bitbucket Pipelines.
Full Description

Python and PostgreSQL for Bitbucket Pipelines
This repository contains a Dockerfile as well as a simple example that shows how you can run your own Docker container with Python and PostgreSQL on Bitbucket Pipelines.

The Docker image is using python 3.5 and PostgreSQL 9.4

Using the image with Bitbucket Pipelines
Just copy/paste the YML below in your bitbucket-pipelines.yml and adapt the script to your needs.

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

image: gasoid/python3.5-postgres


- step:
    script: # Modify the commands below to build your repository.
      - /etc/init.d/postgresql start # starting the service
      - sudo -u postgres psql -c "CREATE USER project_name WITH ENCRYPTED PASSWORD 'project_name' SUPERUSER;" # create superuser
      - sudo -u postgres psql -c "CREATE DATABASE project_name OWNER project_name;" # create database
      - pip install -r requirements.txt
      - pytest --create-db
Docker Pull Command