Skip to content

Instantly share code, notes, and snippets.

@theconsolelogger
Last active October 19, 2019 08:55
Show Gist options
  • Save theconsolelogger/21db87c998d84d10defd4523a3aae4e7 to your computer and use it in GitHub Desktop.
Save theconsolelogger/21db87c998d84d10defd4523a3aae4e7 to your computer and use it in GitHub Desktop.
A Docker Compose file for running a Laravel Docker image with a PostgreSQL database.
version: "3.7"
services:
api:
image: docker.pkg.github.com/jonathanstaniforth/laravel-docker/laravel-postgresql:v1.1
ports:
- 80:80
- 443:443
volumes:
- ./:/var/www/laravel
depends_on:
- database
networks:
- overlay
database:
image: postgres
environment:
POSTGRES_USER: <user_name>
POSTGRES_PASSWORD: <user_password>
POSTGRES_DATABASE: <database_name>
volumes:
- type: bind
source: ./dbdata
target: /var/lib/postgresql/data
ports:
- 5432:5432
networks:
- overlay
networks:
overlay:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment