benwilber/boltstream

Missing app.env file

0x62 opened this issue · 1 comments

0x62 commented

One of the tasks for setup is to copy ansible/roles/app/files/app.env to /.env, however this file has been excluded in gitignore and isn't present in the repo.

I'm guessing this file interpolates the variables from the terraform config for the app (e.g. database host).

Can you please provide this file?

I tried to reverse engineer it, and ended up with the below but I might have missed stuff (in mine I've changed from MariaDB to Postgres):

SECRET_KEY=debug
DATABASE_URL=postgresql://{{ database_user }}:{{ database_password }}@{{ database_host }}:{{ database_port }}/{{ database_name }}
CACHE_URL={{ cache_url }}
BROKER_URL={{ broker_url }}
AWS_STORAGE_BUCKET_NAME={{ aws_storage_bucket_name }}
AWS_S3_CUSTOM_DOMAIN={{ aws_s3_custom_domain }}
AWS_S3_REGION_NAME={{ aws_s3_region_name }}
AWS_S3_ENDPOINT_URL={{ aws_s3_endpoint_url }}
RTMP_SECRET={{ rtmp_secret }}
RTMP_ENDPOINT={{ rtmp_endpoint }}
EXPIRE_VIEWER_SECONDS=60
SESSION_COOKIE_DOMAIN=domain
CSRF_TRUSTED_ORIGINS=domain
PORT=8083
0x62 commented

I managed to get the project deployed, this is what I needed in the file:

PORT={{ app_port }}
SECRET_KEY=<secret>
DATABASE_URL=postgresql://{{ database_user }}:{{ database_password }}@{{ database_host }}:{{ database_port }}/{{ database_name }}
CACHE_URL={{ cache_url }}
BROKER_URL={{ broker_url }}
AWS_STORAGE_BUCKET_NAME={{ aws_storage_bucket_name }}
AWS_S3_CUSTOM_DOMAIN={{ aws_s3_custom_domain }}
AWS_S3_REGION_NAME={{ aws_s3_region_name }}
AWS_S3_ENDPOINT_URL={{ aws_s3_endpoint_url }}
RTMP_SECRET={{ rtmp_secret }}
RTMP_ENDPOINT={{ rtmp_endpoint }}
STATIC_ROOT={{ web_root }}/static
EXPIRE_VIEWER_SECONDS=60
SESSION_COOKIE_DOMAIN=<domain>
CSRF_TRUSTED_ORIGINS=<domain>