Skip to content

Instantly share code, notes, and snippets.

@jrushlow
Created February 2, 2021 16:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jrushlow/853bc0822dd68064bf78ebb565b0ed37 to your computer and use it in GitHub Desktop.
docker-compose.yaml
version: '3.7'
services:
database:
image: 'postgres:latest'
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: main
POSTGRES_DB: main
ports:
# To allow the host machine to access the ports below, modify the lines below.
# For example, to allow the host to connect to port 3306 on the container, you would change
# "3306" to "3306:3306". Where the first port is exposed to the host and the second is the container port.
# See https://docs.docker.com/compose/compose-file/#ports for more information.
- '5432:5432'
volumes:
- ./relative-path-on-host:/abusolute-path-in-container
- ./src:/var/www/src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment