diff --git a/postgres-compose.yml b/postgres-compose.yml new file mode 100644 index 0000000..be26fec --- /dev/null +++ b/postgres-compose.yml @@ -0,0 +1,30 @@ +services: + postgres: + image: postgres:16 + restart: unless-stopped + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: your_secure_password_here + POSTGRES_DB: myapp + PGDATA: /var/lib/postgresql/data/pgdata + volumes: + - postgres_data:/var/lib/postgresql/data + ports: + - "5432:5432" + + pgadmin: + image: dpage/pgadmin4:latest + restart: unless-stopped + environment: + PGADMIN_DEFAULT_EMAIL: admin@example.com + PGADMIN_DEFAULT_PASSWORD: admin_password_here + volumes: + - pgadmin_data:/var/lib/pgadmin + ports: + - "8080:80" + depends_on: + - postgres + +volumes: + postgres_data: + pgadmin_data: