compose.yaml 957 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. volumes:
  16. - db-data:/app/data
  17. - upload-data:/app/uploaded_files
  18. restart: always
  19. webserver:
  20. environment:
  21. DOMAIN: ${DOMAIN:-localhost}
  22. ports:
  23. - 443:443
  24. - 80:80 # For acme-challenge via HTTP.
  25. build:
  26. context: .
  27. dockerfile: Caddy.Dockerfile
  28. volumes:
  29. - caddy-data:/root/.caddy
  30. restart: always
  31. depends_on:
  32. - app
  33. volumes:
  34. # SQLite data
  35. db-data:
  36. # Uploaded files
  37. upload-data:
  38. # TLS keys and certificates
  39. caddy-data: