From 16a65fa6c5420a13731e2cfd85e7e5d6701cfcb4 Mon Sep 17 00:00:00 2001 From: subnub Date: Tue, 25 Feb 2025 09:06:56 -0500 Subject: [PATCH] updated env examples --- backend/config/.env.development.example | 13 ++-- backend/config/.env.production.example | 88 +++++++++++++++++++++---- backend/config/.env.test.example | 88 +++++++++++++++++++++---- 3 files changed, 160 insertions(+), 29 deletions(-) diff --git a/backend/config/.env.development.example b/backend/config/.env.development.example index 50e1c00..27cfd48 100644 --- a/backend/config/.env.development.example +++ b/backend/config/.env.development.example @@ -1,3 +1,6 @@ +# Either remove the .example from the end of this filename. +# Or create a new file with the same name, but without the .example extension. + # MongoDB URL: Connection string for your MongoDB database # example: mongodb://localhost:27017/mydrive MONGODB_URL= @@ -21,16 +24,16 @@ S3_BUCKET= # Encryiption Key (optional): The encryption key used to encrypt the files. # DO NOT LOSE OR FORGET THIS KEY AS ALL DATA WILL BE LOST IF YOU LOSE IT. -# If you do not supply a key, the app will instead prompt you to type one into the terminal when you start the app. +# If you do not supply a key, the app will instead prompt you to type one into the terminal when you start the server. KEY= -# Ports (optional): The ports to run the app on. +# Ports (optional): The ports to run the server on. # HTTP_PORT: Default port is 3000 # HTTPS_PORT: Default port is 8080 HTTP_PORT= HTTPS_PORT= -# URL (optional): The URL to run the app on. +# URL (optional): The URL to run the server on. # Most likely not needed, but useful if you are running docker or such # And need to bind to 0.0.0.0 instead. URL= @@ -50,7 +53,7 @@ REMOTE_URL= # Access tokens, refresh, and cookie # These should be randomly generated in a secure manner. # If you lose these tokens, all users will be logged out. -# You can also change these if you want to force all users to login again. +# You can also change these if you want to force all users to be logged out. # Each token should be a different string. # Example: sa4hQqJwGFLC1LJk59 PASSWORD_ACCESS= @@ -62,7 +65,7 @@ PASSWORD_COOKIE= # VIDEO_THUMBNAILS_ENABLED=true VIDEO_THUMBNAILS_ENABLED= -# Video thumbnails continued: +# Video thumbnails continued (optional): # Sometimes generating a video thumbnail will fail with the default method. # If so you can choose to instead temporarily store the video in a directory, and generate a thumbnail from that. # WARNING: The file will be temporarily stored in this directory UNENCRYPTED. diff --git a/backend/config/.env.production.example b/backend/config/.env.production.example index c3ef179..27cfd48 100644 --- a/backend/config/.env.production.example +++ b/backend/config/.env.production.example @@ -1,23 +1,87 @@ +# Either remove the .example from the end of this filename. +# Or create a new file with the same name, but without the .example extension. + +# MongoDB URL: Connection string for your MongoDB database +# example: mongodb://localhost:27017/mydrive MONGODB_URL= + +# Database Type: Choose between "fs" and "s3", this specifies where the files will be stored. +# fs = Filesystem +# s3 = Amazon S3 DB_TYPE= + +# If using fs, +# File Storage Directory: The directory where the files will be stored. Must be exact path. +# PATH MUST END IN A SLASH +# Example: /Users/kyle/mydrive/ +FS_DIRECTORY= + +# If using s3, +# S3 Data: The S3 bucket and key where the files will be stored. +S3_ID= +S3_KEY= +S3_BUCKET= + +# Encryiption Key (optional): The encryption key used to encrypt the files. +# DO NOT LOSE OR FORGET THIS KEY AS ALL DATA WILL BE LOST IF YOU LOSE IT. +# If you do not supply a key, the app will instead prompt you to type one into the terminal when you start the server. +KEY= + +# Ports (optional): The ports to run the server on. +# HTTP_PORT: Default port is 3000 +# HTTPS_PORT: Default port is 8080 HTTP_PORT= HTTPS_PORT= -PASSWORD_ACCESS= -PASSWORD_REFRESH= -PASSWORD_COOKIE= -_SECURE_COOKIES= -FS_DIRECTORY= -KEY= + +# URL (optional): The URL to run the server on. +# Most likely not needed, but useful if you are running docker or such +# And need to bind to 0.0.0.0 instead. +URL= + +# Email verifcation (optional): If you want to enable email verification configure as so. +# EMAIL_VERIFICATION=true +# Remote URL: This refers to the URL sent in the verification email: Example https://mydrive-storage.com +# Please navigate to the following link to verify your email address: {REMOTE_URL}/verify +# Should NOT end with a slash EMAIL_VERIFICATION= EMAIL_DOMAIN= EMAIL_ADDRESS= EMAIL_API_KEY= EMAIL_HOST= REMOTE_URL= -S3_ID= -S3_KEY= -S3_BUCKET= -URL= -TEMP_DIRECTORY= + +# Access tokens, refresh, and cookie +# These should be randomly generated in a secure manner. +# If you lose these tokens, all users will be logged out. +# You can also change these if you want to force all users to be logged out. +# Each token should be a different string. +# Example: sa4hQqJwGFLC1LJk59 +PASSWORD_ACCESS= +PASSWORD_REFRESH= +PASSWORD_COOKIE= + +# Video thumbnails (optional): If you want to enable video thumbnails, configure as so. +# Video thumbnail generation relies on ffmpeg, please ensure you have it installed. +# VIDEO_THUMBNAILS_ENABLED=true VIDEO_THUMBNAILS_ENABLED= -TEMP_VIDEO_THUMBNAIL_LIMIT= \ No newline at end of file + +# Video thumbnails continued (optional): +# Sometimes generating a video thumbnail will fail with the default method. +# If so you can choose to instead temporarily store the video in a directory, and generate a thumbnail from that. +# WARNING: The file will be temporarily stored in this directory UNENCRYPTED. +# Temp directory example: /Users/kyle/mydrive/temp/ +# Temp video thumbnail limit: The maximum size of a video thumbnail in bytes. +# Example: 5000000000 +TEMP_DIRECTORY= +TEMP_VIDEO_THUMBNAIL_LIMIT= + +# Marks cookie generation as secure (Optional) +# This is recommended and should be enabled if you are running the app on HTTPS. +# SECURE_COOKIES=true +SECURE_COOKIES= + +# SSL (Optional): If you want to enable SSL, configure as so. +# SSL=true +# Place your SSL certificate files in the root directory of the project +# With the names: certificate.crt, certificate.key, and certificate.ca-bundle; +SSL= \ No newline at end of file diff --git a/backend/config/.env.test.example b/backend/config/.env.test.example index c3ef179..27cfd48 100644 --- a/backend/config/.env.test.example +++ b/backend/config/.env.test.example @@ -1,23 +1,87 @@ +# Either remove the .example from the end of this filename. +# Or create a new file with the same name, but without the .example extension. + +# MongoDB URL: Connection string for your MongoDB database +# example: mongodb://localhost:27017/mydrive MONGODB_URL= + +# Database Type: Choose between "fs" and "s3", this specifies where the files will be stored. +# fs = Filesystem +# s3 = Amazon S3 DB_TYPE= + +# If using fs, +# File Storage Directory: The directory where the files will be stored. Must be exact path. +# PATH MUST END IN A SLASH +# Example: /Users/kyle/mydrive/ +FS_DIRECTORY= + +# If using s3, +# S3 Data: The S3 bucket and key where the files will be stored. +S3_ID= +S3_KEY= +S3_BUCKET= + +# Encryiption Key (optional): The encryption key used to encrypt the files. +# DO NOT LOSE OR FORGET THIS KEY AS ALL DATA WILL BE LOST IF YOU LOSE IT. +# If you do not supply a key, the app will instead prompt you to type one into the terminal when you start the server. +KEY= + +# Ports (optional): The ports to run the server on. +# HTTP_PORT: Default port is 3000 +# HTTPS_PORT: Default port is 8080 HTTP_PORT= HTTPS_PORT= -PASSWORD_ACCESS= -PASSWORD_REFRESH= -PASSWORD_COOKIE= -_SECURE_COOKIES= -FS_DIRECTORY= -KEY= + +# URL (optional): The URL to run the server on. +# Most likely not needed, but useful if you are running docker or such +# And need to bind to 0.0.0.0 instead. +URL= + +# Email verifcation (optional): If you want to enable email verification configure as so. +# EMAIL_VERIFICATION=true +# Remote URL: This refers to the URL sent in the verification email: Example https://mydrive-storage.com +# Please navigate to the following link to verify your email address: {REMOTE_URL}/verify +# Should NOT end with a slash EMAIL_VERIFICATION= EMAIL_DOMAIN= EMAIL_ADDRESS= EMAIL_API_KEY= EMAIL_HOST= REMOTE_URL= -S3_ID= -S3_KEY= -S3_BUCKET= -URL= -TEMP_DIRECTORY= + +# Access tokens, refresh, and cookie +# These should be randomly generated in a secure manner. +# If you lose these tokens, all users will be logged out. +# You can also change these if you want to force all users to be logged out. +# Each token should be a different string. +# Example: sa4hQqJwGFLC1LJk59 +PASSWORD_ACCESS= +PASSWORD_REFRESH= +PASSWORD_COOKIE= + +# Video thumbnails (optional): If you want to enable video thumbnails, configure as so. +# Video thumbnail generation relies on ffmpeg, please ensure you have it installed. +# VIDEO_THUMBNAILS_ENABLED=true VIDEO_THUMBNAILS_ENABLED= -TEMP_VIDEO_THUMBNAIL_LIMIT= \ No newline at end of file + +# Video thumbnails continued (optional): +# Sometimes generating a video thumbnail will fail with the default method. +# If so you can choose to instead temporarily store the video in a directory, and generate a thumbnail from that. +# WARNING: The file will be temporarily stored in this directory UNENCRYPTED. +# Temp directory example: /Users/kyle/mydrive/temp/ +# Temp video thumbnail limit: The maximum size of a video thumbnail in bytes. +# Example: 5000000000 +TEMP_DIRECTORY= +TEMP_VIDEO_THUMBNAIL_LIMIT= + +# Marks cookie generation as secure (Optional) +# This is recommended and should be enabled if you are running the app on HTTPS. +# SECURE_COOKIES=true +SECURE_COOKIES= + +# SSL (Optional): If you want to enable SSL, configure as so. +# SSL=true +# Place your SSL certificate files in the root directory of the project +# With the names: certificate.crt, certificate.key, and certificate.ca-bundle; +SSL= \ No newline at end of file