docker-compose.hbs 879 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. version: "3"
  2. services:
  3. server:
  4. build:
  5. context: .
  6. dockerfile: Dockerfile
  7. ports:
  8. - 3000:3000
  9. command: [{{#if useYarn}}"yarn"{{else}}"npm", "run"{{/if}}, "start:server"]
  10. volumes:
  11. - /usr/src/app
  12. environment:
  13. DB_HOST: database
  14. DB_PORT: 5432
  15. DB_NAME: vendure
  16. DB_USERNAME: postgres
  17. DB_PASSWORD: password
  18. worker:
  19. build:
  20. context: .
  21. dockerfile: Dockerfile
  22. command: [{{#if useYarn}}"yarn"{{else}}"npm", "run"{{/if}}, "start:worker"]
  23. volumes:
  24. - /usr/src/app
  25. environment:
  26. DB_HOST: database
  27. DB_PORT: 5432
  28. DB_NAME: vendure
  29. DB_USERNAME: postgres
  30. DB_PASSWORD: password
  31. database:
  32. image: postgres
  33. volumes:
  34. - /var/lib/postgresql/data
  35. ports:
  36. - 5432:5432
  37. environment:
  38. POSTGRES_PASSWORD: password
  39. POSTGRES_DB: vendure