docker-compose.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. version: '3.8'
  2. services:
  3. app:
  4. build:
  5. context: ..
  6. dockerfile: .devcontainer/Dockerfile
  7. args:
  8. VARIANT: 1.17-bullseye
  9. volumes:
  10. - ..:/workspace:cached
  11. # Overrides default command so things don't shut down after the process ends.
  12. command: sleep infinity
  13. environment:
  14. PG_HOST: postgresql
  15. PG_USER: postgres
  16. PG_DATABASE: dinotest
  17. PG_PASSWORD: mysecretpassword
  18. MYSQL_DATABASE: dinotest
  19. MYSQL_HOST: mysql
  20. MYSQL_ROOT_PASSWORD: mysecretpassword
  21. mysql:
  22. image: "mysql:8"
  23. ports:
  24. - "3306:3306"
  25. restart: unless-stopped
  26. environment:
  27. MYSQL_DATABASE: dinotest
  28. MYSQL_ROOT_PASSWORD: mysecretpassword
  29. postgresql:
  30. image: "postgres:13"
  31. ports:
  32. - "5432:5432"
  33. restart: unless-stopped
  34. environment:
  35. POSTGRES_DB: dinotest
  36. POSTGRES_PASSWORD: mysecretpassword
  37. POSTGRES_USER: postgres
  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.)