Skip to content

Instantly share code, notes, and snippets.

@mostafabahri
Last active August 8, 2018 15:13
Show Gist options
  • Save mostafabahri/7c1adb62473768323f3312474d379d42 to your computer and use it in GitHub Desktop.
Save mostafabahri/7c1adb62473768323f3312474d379d42 to your computer and use it in GitHub Desktop.
Minimal Dockerized Postgres for Laravel
version: '2'
services:
dev-pg:
image: 'postgres:10-alpine'
volumes:
- 'dev:/var/lib/postgresql/data'
environment:
- POSTGRES_DB=app_dev
- POSTGRES_USER=laravel
- POSTGRES_PASSWORD=secret
ports:
- '5433:5432'
test-pg:
image: 'postgres:10-alpine'
# volumes: // no need to persist test data
# - null
environment:
- POSTGRES_DB=app_test
- POSTGRES_USER=laravel
- POSTGRES_PASSWORD=secret
ports:
- '5434:5432'
volumes:
dev:

Install Docker and Docker-compose :
wget -O - https://gist.githubusercontent.com/wdullaer/f1af16bd7e970389bad3/raw/install.sh | bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment