sha256:705a9ac72ddeb31d30f6527a438ab9d5b3cd7921638b1de5a2dcca58c54dfc4b
Last pushed
1 day by dockeryzer
Type
Compose
Manifest digest
sha256:705a9ac72ddeb31d30f6527a438ab9d5b3cd7921638b1de5a2dcca58c54dfc4b
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
POSTGRES_DB: stripe_replica
ports:
- '5432:5432'
volumes:
- stripe_replica_pg_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- '6379:6379'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 5s
retries: 10
api:
# Docker Hub image name. `docker compose build` tags the local build with it,
# and `docker compose pull` fetches it on machines that only have this file.
image: ${DOCKERHUB_USER:-yourdockerhubuser}/stripe-replica-api:${IMAGE_TAG:-1.0.0}
build:
context: ./backend
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
PORT: 4242
PUBLIC_BASE_URL: ${PUBLIC_BASE_URL:-http://localhost:4242}
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: postgres
DB_PASSWORD: ${DB_PASSWORD:-postgres}
DB_NAME: stripe_replica
REDIS_HOST: redis
REDIS_PORT: 6379
ports:
- '4242:4242'
# One-shot container to populate sample data. Runs after `api` is up, then
# exits. Re-run any time with: docker compose run --rm seeder
# Uses the same image as `api` (the compiled seed script ships inside it).
seeder:
image: ${DOCKERHUB_USER:-yourdockerhubuser}/stripe-replica-api:${IMAGE_TAG:-1.0.0}
depends_on:
- api
environment:
BASE_URL: http://api:4242
entrypoint: ['sh', '-c', 'sleep 5 && node dist/seed/seed.js']
profiles:
- seed
volumes:
stripe_replica_pg_data:
docker compose -f oci://dockeryzer/stripe-replica-stack:1.0.0 upUse the above command to pull and run the Compose file. Learn more.
The PostgreSQL object-relational database system provides reliability and data integrity.
Pulls
1B+
Stars
15036
Last Updated
about 23 hours
Redis is the world’s fastest data platform for caching, vector search, and NoSQL databases.
Pulls
1B+
Stars
13624
Last Updated
10 days