Skip to content

Instantly share code, notes, and snippets.

@dudash
Last active November 17, 2017 19:35
Show Gist options
  • Save dudash/85df0277ebe8fc436e8420329cbc605b to your computer and use it in GitHub Desktop.
Save dudash/85df0277ebe8fc436e8420329cbc605b to your computer and use it in GitHub Desktop.
Stack containing Postgres and Adminer (images coming from dockerhub)
# Use postgres/example user/password credentials
# Switch 3001 to the port you want to expose on localhost
version: '3.1'
services:
db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: example
adminer:
image: adminer
restart: always
ports:
- 3001:8080
@dudash
Copy link
Author

dudash commented Nov 17, 2017

run this stack with:

docker stack deploy -c postgres_demo.yml postgres

If you don't have a swarm setup, you will probably have to also run:
docker swarm init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment