- Copy this compose file
- Setup folder:
mkdir dbdata
version: "3.3" | |
services: | |
pg: | |
image: postgres:13.1-alpine | |
volumes: | |
- ./dbdata:/var/lib/postgresql/data | |
environment: | |
POSTGRES_USER: "postgres" | |
POSTGRES_PASSWORD: "password" | |
# initial database | |
POSTGRES_DB: "postgres" | |
ports: | |
- "54321:5432" | |
pgAdmin: | |
depends_on: | |
- pg | |
image: dpage/pgadmin4 | |
environment: | |
PGADMIN_DEFAULT_EMAIL: "[email protected]" | |
PGADMIN_DEFAULT_PASSWORD: "password" | |
ports: | |
- "54322:80" | |
redis: | |
image: redis:6.0.10-alpine | |
ports: | |
- "63790:6379" |