- Save stack.yml to your computer
- Copy & paste start_docker.sh into your command line to start a postgres instance
- Set up a .pgpass file with 2 lines. One for the RDS instance and one for your local postgres instance. Put the file in your home directory
- Copy & paste load_data.sh into your command line, to load data to your local instance. This may take 30 minutes.
- Now you can use your docker machine's IP address at port 5432 as a hestia instance
Last active
May 17, 2018 00:32
-
-
Save calebcauthon/3cca1e42da1040cdad16789ec24cd737 to your computer and use it in GitHub Desktop.
Run a Postgres Instance using Docker
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
<HOST>:5432:*:<USERNAME>:<PASSWORD> | |
<HOST>:5432:*:<USERNAME>:<PASSWORD> |
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
pg_dump -h <rds_host_full_uri e.g., something.amazon.com> -U ops -C prod | psql -h <your docker machine IP e.g., 192.168.99.100> -U postgres postgres |
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
# Use postgres/example user/password credentials | |
version: '3.1' | |
services: | |
db: | |
image: postgres | |
environment: | |
POSTGRES_PASSWORD: example | |
ports: | |
- 5432:5432 |
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
docker stack deploy -c stack.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker stack deploy -c stack.yml is not working for me, ```"docker stack deploy" requires exactly 1 argument(s).
See 'docker stack deploy --help'.
Usage: docker stack deploy [OPTIONS] STACK
Deploy a new stack or update an existing stack``` Help?