Skip to content

Instantly share code, notes, and snippets.

@JonathanLoscalzo
Created August 28, 2024 01:28
Show Gist options
  • Save JonathanLoscalzo/6ed195b3575bc256ea313399356f5b39 to your computer and use it in GitHub Desktop.
Save JonathanLoscalzo/6ed195b3575bc256ea313399356f5b39 to your computer and use it in GitHub Desktop.
Postgres + PGAdmin
version: '3.9'
services:
db:
container_name: tabi_postgres
platform: linux/amd64/v8
image: postgres
restart: unless-stopped
shm_size: 128mb
volumes:
# deben crear una carpeta data donde guardarán sus datos
- ./data:/tmp/
- postgres:/data/postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-212121}
PGDATA: /data/postgres
networks:
- tabi
pgadmin:
container_name: tabi_pgadmin
platform: linux/amd64/v8
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-212121}
volumes:
- pgadmin:/root/.pgadmin
ports:
- "${PGADMIN_PORT:-5050}:80"
networks:
- tabi
restart: unless-stopped
volumes:
postgres:
pgadmin:
networks:
tabi:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment