Skip to content

Commit

Permalink
readme, config update to get .env correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
gen4sp committed Feb 12, 2021
1 parent 9f69261 commit f362142
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
---
## Local Environments
- Create epmty .env file and put it into ~/packages/server and ~/packages/worker

## Prerequirements

# Setup Google Storage

- Put GCloudStorage Key in ~/keys/

- Add varables in both .env fiiles

For Dev:

- GC_PROJECT - google storage project
- GCS_BUCKET - google storage bucket
- KEY_FILE_FOR_GC - key file for google storage
- QUEUE_URL - url for queue service
- SENTRY_URL - Sentry (logging service) url for worker


For production:
- QUEUE_CERT, QUEUE_KEY, QUEUE_PASSPHRASE, QUEUE_CA - crdits for queue service
- DATABASE_URL - Databese url (SQL)

## Install and run

Expand Down
10 changes: 7 additions & 3 deletions config/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,27 @@ auth:
accessSecret: "secret1"

mailing:
sendgrid_key: <sendgrid_key>
sendgrid_key:
$env: SENDGRID_KEY

render:
type: fakerender
tasksDir:
$resolvePath: ../temp

cdn: <cdn_url>
cdn:
$env: CDN_URL

file_storage: gcloud_storage
gcloud_storage:
project:
$env: GC_PROJECT
bucket:
$env: GCS_BUCKET
keyDir:
$resolvePath: ../keys
keyFilename:
$resolvePath: <key_file_for_gc>
$env: KEY_FILE_FOR_GC

render_temp_dir:
$resolvePath: ../temp
Expand Down
6 changes: 4 additions & 2 deletions config/worker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
$include: ./common.yml

logs:
sentry: <sentry_url>
sentry:
$env: SENTRY_URL
level: debug
format: simple

Expand All @@ -11,7 +12,8 @@ render:
$resolvePath: ../temp

queue:
url: amqp://<main_server_url>:5672/
url:
$env: QUEUE_URL
opts:
cert:
$resolvePath: ../keys/cert.pem
Expand Down

0 comments on commit f362142

Please sign in to comment.