1
0

compose.yaml 994 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Base compose file production deployment of reflex app with Caddy webserver
  2. # providing TLS termination and reverse proxying.
  3. #
  4. # See `compose.prod.yaml` for more robust and performant deployment option.
  5. #
  6. # During build and run, set environment DOMAIN pointing
  7. # to publicly accessible domain where app will be hosted
  8. services:
  9. app:
  10. image: local/reflex-app
  11. environment:
  12. DB_URL: sqlite:///data/reflex.db
  13. build:
  14. context: .
  15. dockerfile: prod.Dockerfile
  16. volumes:
  17. - db-data:/app/data
  18. - upload-data:/app/uploaded_files
  19. restart: always
  20. webserver:
  21. environment:
  22. DOMAIN: ${DOMAIN:-localhost}
  23. ports:
  24. - 443:443
  25. - 80:80 # For acme-challenge via HTTP.
  26. build:
  27. context: .
  28. dockerfile: Caddy.Dockerfile
  29. volumes:
  30. - caddy-data:/root/.caddy
  31. restart: always
  32. depends_on:
  33. - app
  34. volumes:
  35. # SQLite data
  36. db-data:
  37. # Uploaded files
  38. upload-data:
  39. # TLS keys and certificates
  40. caddy-data: