Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions backend/eduapp_db/.env-example-development
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# RAILS
# Do not modify unless you know what you are doing.
RAILS_SECRET_KEY=599fef69235287bd8c268db895897f236aebf4f63971aa48f48e3ee81c5612006a4857751cb1859546ccde67bb84cb3cc799a6aa9196b036d9a872dcd7765809
ENCRYPTION_SALT="81IJngXK2FE1+1J2Ugs1VxuK0yTnUyZQCSFbv0SUNRgZpMN7EN8SzoeSDuD+\nOXU0cwQyoFaAgfsckvz0di4SIyxHZs0OWey32Y5VI6Dg8rTNR8q2Z+oIv4tS\n2DOYeQ56uax3nQ/A+JikqvsLAfZYjhe3OpB5GUlgeJFnA30xB68Ock3HSInI\nW1kuZxN8dQu2eGwPT+3iNR9/DHe0Zku3G5MtZNzciHAT04JXVP+YXVraLVv1\nj5ctdDmWx1shNoBidO3q6PS+0peInRJmChVHcfoaBbhQuF2hv5vv5Qcd/c0f\nUDOWqho2DrA3hYm252t5BWTjfNoI3p7M0E1KRHmZDQ==\n"
ENCRYPTION_PATTERN="#_::_#"

RAILS_ENV=development
API_VERSION="v1"

# POSTGRES CONFIG
# This needs to match the 'postgres.docker-example.env' configured variables.
DEV_DB_USER="eduapp_user"
DEV_DB_PSWD="custom-password-1234"
DEV_DB_PORT="5432" # Do not touch.

# HOSTING CONFIG
# Do not touch. This is internal.
PORT=3010
DB_HOST=db # WITH DOCKER
HOST="localhost" # DEVELOPMENT
DOMAIN="localhost" # DEVELOPMENT

# FRONTEND ENPOINT FOR CORS
# It is important for your domain/url not to end with '/', as
# the CORS policy won't detect it an forbid you from entering
# Localhost example:
REACT_APP_FRONTEND_ENDPOINT=http://localhost:8443
REACT_APP_ADMIN_ENDPOINT=http://localhost:4010


# EMAIL
# Do not touch. This is internal.
SMTP_PORT=587
SMTP_ADDRESS=smtp.gmail.com
# If you wish to use a different email for sending
# emails to users, change it here.
GMAIL_USERNAME=youremail@gmail.com
GMAIL_PASSWORD=yourpassword
37 changes: 37 additions & 0 deletions backend/eduapp_db/.env-example-production
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# RAILS
# Do not modify unless you know what you are doing.
RAILS_SECRET_KEY=599fef69235287bd8c268db895897f236aebf4f63971aa48f48e3ee81c5612006a4857751cb1859546ccde67bb84cb3cc799a6aa9196b036d9a872dcd7765809
ENCRYPTION_SALT="81IJngXK2FE1+1J2Ugs1VxuK0yTnUyZQCSFbv0SUNRgZpMN7EN8SzoeSDuD+\nOXU0cwQyoFaAgfsckvz0di4SIyxHZs0OWey32Y5VI6Dg8rTNR8q2Z+oIv4tS\n2DOYeQ56uax3nQ/A+JikqvsLAfZYjhe3OpB5GUlgeJFnA30xB68Ock3HSInI\nW1kuZxN8dQu2eGwPT+3iNR9/DHe0Zku3G5MtZNzciHAT04JXVP+YXVraLVv1\nj5ctdDmWx1shNoBidO3q6PS+0peInRJmChVHcfoaBbhQuF2hv5vv5Qcd/c0f\nUDOWqho2DrA3hYm252t5BWTjfNoI3p7M0E1KRHmZDQ==\n"
ENCRYPTION_PATTERN="#_::_#"

RAILS_ENV=production
API_VERSION="v1"

# POSTGRES CONFIG
# This needs to match the 'postgres.docker-example.env' configured variables.
PROD_DB_USER="eduapp_user"
PROD_DB_PSWD="custom-password-1234"
PROD_DB_PORT="5432" # Do not touch.

# HOSTING CONFIG
# Do not touch. This is internal.
PORT=3010
DB_HOST=db # WITH DOCKER

HOST=your-backend-domain
DOMAIN=your-backend-domain

# FRONTEND ENPOINT FOR CORS
# It is important for your domain/url not to end with '/', as
# the CORS policy won't detect it an forbid you from entering
REACT_APP_FRONTEND_ENDPOINT=https://your-frontend-domain:port
REACT_APP_ADMIN_ENDPOINT=https://your-admin-domain:port

# EMAIL
# Do not touch. This is internal.
SMTP_PORT=587
SMTP_ADDRESS=smtp.gmail.com
# If you wish to use a different email for sending
# emails to users, change it here.
GMAIL_USERNAME=youremail@gmail.com
GMAIL_PASSWORD=yourpassword
8 changes: 8 additions & 0 deletions backend/eduapp_db/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ node_modules
*.env
!*docker-example.env
.DS_Store

config-velorcios

.env-real-production

dockerfile-real-production

dockerfile
2 changes: 1 addition & 1 deletion backend/eduapp_db/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.6.8
ruby-3.1.2
4 changes: 2 additions & 2 deletions backend/eduapp_db/Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "2.6.8"
# ruby "2.6.9" # Only to be used when building a docker image.
ruby "3.1.2"

gem "rails", "~> 6.1.4", ">= 6.1.4.1"
gem "pg", "~> 1.1"
Expand All @@ -21,6 +20,7 @@ gem "bootsnap", ">= 1.4.4", require: false
gem "omniauth-rails_csrf_protection"
gem "omniauth-google-oauth2"
gem "omniauth"
gem "net-smtp"

group :development, :test do
gem "byebug", platforms: [:mri, :mingw, :x64_mingw]
Expand Down
Loading