Skip to content

Instantly share code, notes, and snippets.

@OlegChuev
Created August 3, 2023 10:32
Show Gist options
  • Save OlegChuev/f0b8fdcc95d56e79e61272a8a4522fca to your computer and use it in GitHub Desktop.
Save OlegChuev/f0b8fdcc95d56e79e61272a8a4522fca to your computer and use it in GitHub Desktop.
Docker Compose Stripe CLI
...
# stripe-cli will automatically pick up STRIPE_API_KEY from dev.env file
STRIPE_API_KEY=sk_test_...
...
version: '3.9'
services:
web:
build: .
volumes:
- ./:/app
ports:
- 3000:3000
stripe-cli:
image: stripe/stripe-cli
container_name: stripe-cli
command: "listen --device-name ${STRIPE_DEVICE_NAME} --forward-to web:3000/${YOUR_API_END_POINT_FOR_WEBHOOKS}"
env_file:
- .env
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment