mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +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>
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
version: '2.2'
|
|
services:
|
|
server:
|
|
build: ../
|
|
command: server
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
PYTHONUNBUFFERED: 0
|
|
REDASH_LOG_LEVEL: "INFO"
|
|
REDASH_REDIS_URL: "redis://redis:6379/0"
|
|
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
|
|
REDASH_RATELIMIT_ENABLED: "false"
|
|
REDASH_ENFORCE_CSRF: "true"
|
|
scheduler:
|
|
build: ../
|
|
command: scheduler
|
|
depends_on:
|
|
- server
|
|
environment:
|
|
REDASH_REDIS_URL: "redis://redis:6379/0"
|
|
worker:
|
|
build: ../
|
|
command: worker
|
|
depends_on:
|
|
- server
|
|
environment:
|
|
PYTHONUNBUFFERED: 0
|
|
REDASH_LOG_LEVEL: "INFO"
|
|
REDASH_REDIS_URL: "redis://redis:6379/0"
|
|
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
|
|
cypress:
|
|
build:
|
|
context: ../
|
|
dockerfile: .circleci/Dockerfile.cypress
|
|
depends_on:
|
|
- server
|
|
- worker
|
|
- scheduler
|
|
environment:
|
|
CYPRESS_baseUrl: "http://server:5000"
|
|
PERCY_TOKEN: ${PERCY_TOKEN}
|
|
PERCY_BRANCH: ${CIRCLE_BRANCH}
|
|
PERCY_COMMIT: ${CIRCLE_SHA1}
|
|
PERCY_PULL_REQUEST: ${CIRCLE_PR_NUMBER}
|
|
COMMIT_INFO_BRANCH: ${CIRCLE_BRANCH}
|
|
COMMIT_INFO_MESSAGE: ${COMMIT_INFO_MESSAGE}
|
|
COMMIT_INFO_AUTHOR: ${CIRCLE_USERNAME}
|
|
COMMIT_INFO_SHA: ${CIRCLE_SHA1}
|
|
COMMIT_INFO_REMOTE: ${CIRCLE_REPOSITORY_URL}
|
|
CYPRESS_PROJECT_ID: ${CYPRESS_PROJECT_ID}
|
|
CYPRESS_RECORD_KEY: ${CYPRESS_RECORD_KEY}
|
|
redis:
|
|
image: redis:3.0-alpine
|
|
restart: unless-stopped
|
|
postgres:
|
|
image: postgres:9.5.6-alpine
|
|
command: "postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=OFF"
|
|
restart: unless-stopped
|