Public Repository

Last pushed: 5 months 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

Quickstart
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

pipelines:
default:

- 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
Owner
gasoid

Comments (0)