docker-compose.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. services:
  2. app:
  3. container_name: torqvoice
  4. build:
  5. context: ..
  6. dockerfile: .devcontainer/Dockerfile
  7. volumes:
  8. - ..:/workspace:cached
  9. env_file:
  10. - ../.env
  11. command: sleep infinity
  12. ports:
  13. - 3000:3000
  14. depends_on:
  15. db:
  16. condition: service_healthy
  17. db:
  18. container_name: torqvoice-db
  19. image: postgres:16-alpine
  20. restart: unless-stopped
  21. volumes:
  22. - postgres-data:/var/lib/postgresql/data
  23. environment:
  24. POSTGRES_USER: torqvoice
  25. POSTGRES_PASSWORD: torqvoice
  26. POSTGRES_DB: torqvoice
  27. ports:
  28. # Loopback only: a laptop on a shared network should not offer its
  29. # database, or pgAdmin below, to the room.
  30. - "127.0.0.1:5432:5432"
  31. healthcheck:
  32. test: ["CMD-SHELL", "pg_isready -U torqvoice"]
  33. interval: 5s
  34. timeout: 5s
  35. retries: 5
  36. pgadmin:
  37. image: dpage/pgadmin4:latest
  38. container_name: torqvoice-pgadmin
  39. restart: unless-stopped
  40. environment:
  41. PGADMIN_DEFAULT_EMAIL: pgadmin@pgadmin.com
  42. PGADMIN_DEFAULT_PASSWORD: pgadmin
  43. PGADMIN_SERVER_JSON_FILE: /pgadmin4/servers.json
  44. PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
  45. PGPASS_FILE: /pgpass
  46. ports:
  47. - "127.0.0.1:8080:80"
  48. depends_on:
  49. - db
  50. volumes:
  51. - pgadmin-data:/var/lib/pgadmin
  52. - ./pgadmin4/servers.json:/pgadmin4/servers.json:ro
  53. - ./pgpass:/pgpass:ro
  54. volumes:
  55. postgres-data:
  56. pgadmin-data: