version: "3.9" services: postgres: image: postgres:16-alpine ports: - "5432:5432" environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=greenpay volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d greenpay"] interval: 5s timeout: 5s retries: 10 frontend: build: context: ./frontend dockerfile: Dockerfile ports: - "3000:3000" environment: - NEXT_PUBLIC_STELLAR_NETWORK=testnet - NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org - NEXT_PUBLIC_API_URL=http://localhost:4000 depends_on: - backend command: npm run dev backend: build: context: ./backend dockerfile: Dockerfile ports: - "4000:4000" environment: - PORT=4000 - NODE_ENV=development - STELLAR_NETWORK=testnet - HORIZON_URL=https://horizon-testnet.stellar.org - ALLOWED_ORIGINS=http://localhost:3000 - DATABASE_URL=postgres://postgres:postgres@postgres:5432/greenpay depends_on: postgres: condition: service_healthy command: npm run dev volumes: postgres_data: