Created
September 12, 2018 17:12
-
-
Save bajorekp/ede7546e89984e37d05eef486ac4cd60 to your computer and use it in GitHub Desktop.
Docker && postgres
This file contains 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" | |
services: | |
db: | |
image: postgres:10.1 | |
env_file: | |
- postgres_env | |
ports: | |
- '5432:5432' | |
restart: always | |
volumes: | |
- ./db_data:/var/lib/postgresql/data |
This file contains 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
POSTGRES_HOST=db | |
POSTGRES_PORT=5432 | |
POSTGRES_USER=postgres | |
POSTGRES_PASSWORD=postgres | |
SECRET_KEY_BASE=temp | |
RAILS_ENV=production | |
RAILS_LOG_TO_STDOUT=true |
This file contains 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
#!/bin/bash | |
open -a "Docker" | |
docker-compose -f postgres.yml build | |
docker-compose -f postgres.yml up -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment