docker-compose.yml 563 B

12345678910111213141516171819202122232425262728293031
  1. version: '3.8'
  2. services:
  3. db:
  4. image: postgres
  5. restart: always
  6. environment:
  7. POSTGRES_USER: myuser
  8. POSTGRES_PASSWORD: mypassword
  9. POSTGRES_DB: mydb
  10. ports:
  11. - "5432:5432"
  12. volumes:
  13. - db_data:/var/lib/postgresql/data
  14. pgadmin:
  15. image: dpage/pgadmin4
  16. restart: always
  17. environment:
  18. PGADMIN_DEFAULT_EMAIL: admin@admin.com
  19. PGADMIN_DEFAULT_PASSWORD: root
  20. ports:
  21. - "8080:80"
  22. volumes:
  23. - pgadmin_data:/var/lib/pgadmin
  24. depends_on:
  25. - db
  26. volumes:
  27. db_data:
  28. pgadmin_data: