Skip to content

Instantly share code, notes, and snippets.

@salma71
Created December 25, 2020 21:07
Show Gist options
  • Save salma71/05f4ae762588d4c46212f8afe21b6c38 to your computer and use it in GitHub Desktop.
Save salma71/05f4ae762588d4c46212f8afe21b6c38 to your computer and use it in GitHub Desktop.
name: Configuring python env for postgress
# do the following jobs on push and on pull requests
on: [push, pull_request]
# define the jobs
jobs:
# first job is to set the servicea
setting-services:
# must runs on linux based operating system
runs-on: ubuntu-latest
timeout-minutes: 10
services:
db_service:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment