Created
January 29, 2020 08:05
-
-
Save nicolas-zozol/04f2efcc3d6fd4028a9f02a80d69e73d to your computer and use it in GitHub Desktop.
Adminer + Postgres docker-compose
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.3" | |
services: | |
# POSTGRES: https://github.com/docker-library/postgres | |
db: | |
image: postgres | |
container_name: db | |
#restart: always | |
environment: | |
POSTGRES_USER: ${POSTGRES_USER} | |
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | |
# exposes 5432 | |
networks: ["stack"] | |
ports: ["5432:5432"] | |
volumes: | |
- db-data:/var/lib/postgresql/data | |
- db-conf:/etc/postgresql | |
adminer: | |
container_name: adminer | |
image: adminer | |
#restart: always | |
ports: | |
- 8080:8080 | |
networks: ["stack"] | |
# Needed for windows. Might be better to uncomment on linux/prod ; check for local | |
volumes: | |
db-data: | |
driver: local | |
db-conf: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?