Created
February 2, 2021 16:11
docker-compose.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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