docker-compose.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. version: '3.8'
  2. services:
  3. app:
  4. build:
  5. context: .
  6. dockerfile: Dockerfile
  7. volumes:
  8. - ../../..:/workspaces:cached
  9. # Overrides default command so things don't shut down after the process ends.
  10. command: sleep infinity
  11. # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
  12. network_mode: service:pgadmin
  13. # Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
  14. # user: root
  15. # Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
  16. # (Adding the "ports" property to this file will not forward from a Codespace.)
  17. db:
  18. image: postgres:17.2
  19. restart: unless-stopped
  20. volumes:
  21. - ./pgdata:/var/lib/postgresql/data
  22. environment:
  23. POSTGRES_PASSWORD: jellyfin
  24. POSTGRES_USER: jellyfin
  25. POSTGRES_DB: Jellyfin
  26. pgadmin:
  27. image: dpage/pgadmin4
  28. restart: unless-stopped
  29. volumes:
  30. - ./pgadmin:/pgadmin
  31. - pgadmin-data:/var/lib/pgadmin
  32. environment:
  33. - PGADMIN_DEFAULT_EMAIL=user@domain.com
  34. - PGADMIN_DEFAULT_PASSWORD=SuperSecret
  35. - PGADMIN_LISTEN_PORT=8081
  36. - PGADMIN_SERVER_JSON_FILE=/pgadmin/servers.json
  37. - PGADMIN_CONFIG_SERVER_MODE=False
  38. # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
  39. # (Adding the "ports" property to this file will not forward from a Codespace.)
  40. volumes:
  41. pgadmin-data: