Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Everyone can use local dev #1902

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
24 changes: 20 additions & 4 deletions configs/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,41 @@ AWS_ACCESS_KEY_ID=AKIAJXF6CNCWBWNX7JZQ
AWS_SECRET_ACCESS_KEY=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
CONTAINER_STOP_LIMIT=10
DOCKER_IMAGE_BUILDER_CACHE=/git-cache
DOMAIN=localhost:3001
DOMAIN=localhost:3000
FULL_API_DOMAIN=http://localhost:3030
GITHUB_CALLBACK_URL=http://localhost:3030/auth/github/callback
GITHUB_CLIENT_ID=043ad89560d61420ea9e
GITHUB_CLIENT_SECRET=2f093b482a760730d639d11fac20fe963a412bcb
GITHUB_DEPLOY_KEYS_BUCKET=runnable.deploykeys.development
GITHUB_DEPLOY_KEYS_BUCKET=runnable.deploykeys.production-gamma
GITHUB_DEPLOY_KEYS_POOL_SIZE=10
GITHUB_DEPLOY_KEY_TITLE=Runnable-development
GITHUB_HOOK_SECRET=3V3RYTHINGisAW3S0ME!
KRAIN_PORT=3100
LOG_SRC=true
MONGO=mongodb://127.0.0.1:27017/runnable2
MONGO=mongodb://api:[REPLACEME]@127.0.0.1:27020/gamma
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is jank, if you need to set this manually, just set it locally when you develop. should not be in repo

OPTIMUS_HOST=optimus-staging-CodeNow.runnableapp.com
OPTIMUS_PORT=80
PORT=3030
RABBITMQ_HOSTNAME=localhost
RABBITMQ_PORT=5672
RABBITMQ_PASSWORD=guest
RABBITMQ_USERNAME=guest
REDIS_IPADDRESS=127.0.0.1
REDIS_PORT=6379
S3_CONTEXT_RESOURCE_BUCKET=runnable.context.resources.development
S3_CONTEXT_RESOURCE_BUCKET=runnable.context.resources.production-gamma
SENDGRID_KEY=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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What key is this?

ALLOW_ALL_CORS=true
BIG_POPPA_HOST=localhost:7788
VALID_REDIR_TLDS=localhost
# used by new relic npm module
NEW_RELIC_TRACER_ENABLED=false
NUM_WORKERS=1
USER_CONTENT_DOMAIN=runnablecloud.com
RABBITMQ_HOSTNAME=localhost
VALID_REDIR_TLDS=runnable-gamma.com,runnable.ninja
WEB_URL=https://app.runnable-gamma.com
SWARM_HOST=http://localhost:52375
IS_QUEUE_WORKER=true
GITHUB_VARNISH_HOST=api.github.com
GITHUB_VARNISH_PORT=443
GITHUB_PROTOCOL=https
7 changes: 5 additions & 2 deletions lib/express-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ app.use(passport.initialize({ userProperty: 'sessionUser' }))
app.use(passport.session())

// Add CSRF protection!
app.use(csrf.csrfValidator)
app.use(csrf.csrfCookieInjector)

if (!envIs('development')) {
app.use(csrf.csrfValidator)
app.use(csrf.csrfCookieInjector)
}

/**
* Attach session properties and request body (if present) to domain
Expand Down