docker-compose.yml 915 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. version: '3'
  2. services:
  3. payload:
  4. image: node:18-alpine
  5. ports:
  6. - '3000:3000'
  7. volumes:
  8. - .:/home/node/app
  9. - node_modules:/home/node/app/node_modules
  10. working_dir: /home/node/app/
  11. command: sh -c "corepack enable && corepack prepare pnpm@latest --activate && pnpm install && pnpm dev"
  12. depends_on:
  13. - mongo
  14. # - postgres
  15. env_file:
  16. - .env
  17. # Ensure your DATABASE_URL uses 'mongo' as the hostname ie. mongodb://mongo/my-db-name
  18. mongo:
  19. image: mongo:latest
  20. ports:
  21. - '27017:27017'
  22. command:
  23. - --storageEngine=wiredTiger
  24. volumes:
  25. - data:/data/db
  26. logging:
  27. driver: none
  28. # Uncomment the following to use postgres
  29. # postgres:
  30. # restart: always
  31. # image: postgres:latest
  32. # volumes:
  33. # - pgdata:/var/lib/postgresql/data
  34. # ports:
  35. # - "5432:5432"
  36. volumes:
  37. data:
  38. # pgdata:
  39. node_modules: