mirror of
https://github.com/valitydev/redash.git
synced 2024-11-06 09:05:17 +00:00
5afd0554d0
* add flask-wtf * add CSRF tokens to all static forms * add CSRF tokens to all axios requests * disable CSRF validation in unit tests * support CSRF-protected requests in *most* cypress tests * don't enfroce CSRF checks by default * avoid CSRF enforcement in unit tests * remove redundant spread * some camel casing hiccups * always yield the CSRF cookie, but avoid enforcing it if CSRF toggle is off * Restyled by prettier (#5056) Co-authored-by: Restyled.io <commits@restyled.io> * set a CSRF header only if cookie is present * enforce CSRF in CI * install lodash directly for Cypress * install request-cookies directly for Cypress. We should probably start loading package.json deps * enable CSRF support when logout and login happen within the same spec Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io>
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
# This configuration file is for the **development** setup.
|
|
# For a production example please refer to getredash/setup repository on GitHub.
|
|
version: "2.2"
|
|
x-redash-service: &redash-service
|
|
build:
|
|
context: .
|
|
args:
|
|
skip_frontend_build: "true"
|
|
volumes:
|
|
- .:/app
|
|
x-redash-environment: &redash-environment
|
|
REDASH_LOG_LEVEL: "INFO"
|
|
REDASH_REDIS_URL: "redis://redis:6379/0"
|
|
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
|
|
REDASH_RATELIMIT_ENABLED: "false"
|
|
REDASH_MAIL_DEFAULT_SENDER: "redash@example.com"
|
|
REDASH_MAIL_SERVER: "email"
|
|
REDASH_ENFORCE_CSRF: "true"
|
|
services:
|
|
server:
|
|
<<: *redash-service
|
|
command: dev_server
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
ports:
|
|
- "5000:5000"
|
|
- "5678:5678"
|
|
environment:
|
|
<<: *redash-environment
|
|
PYTHONUNBUFFERED: 0
|
|
scheduler:
|
|
<<: *redash-service
|
|
command: dev_scheduler
|
|
depends_on:
|
|
- server
|
|
environment:
|
|
<<: *redash-environment
|
|
worker:
|
|
<<: *redash-service
|
|
command: dev_worker
|
|
depends_on:
|
|
- server
|
|
environment:
|
|
<<: *redash-environment
|
|
PYTHONUNBUFFERED: 0
|
|
redis:
|
|
image: redis:3-alpine
|
|
restart: unless-stopped
|
|
postgres:
|
|
image: postgres:9.5-alpine
|
|
# The following turns the DB into less durable, but gains significant performance improvements for the tests run (x3
|
|
# improvement on my personal machine). We should consider moving this into a dedicated Docker Compose configuration for
|
|
# tests.
|
|
ports:
|
|
- "15432:5432"
|
|
command: "postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=OFF"
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_HOST_AUTH_METHOD: "trust"
|
|
email:
|
|
image: djfarrelly/maildev
|
|
ports:
|
|
- "1080:80"
|
|
restart: unless-stopped
|