Skip to content

Commit

Permalink
remove staging environment + force STORAGE_PROVIDER=local in Docker p…
Browse files Browse the repository at this point in the history
…roduction test
  • Loading branch information
markets committed Feb 13, 2024
1 parent f850360 commit 9b957d0
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 17 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ In order to configure the application you can use the following ENV variables:
| ENV | Description | Default |
| --- | --- | --- |
| `ADMINS` | Space separated list of emails for the superadmins (ie: `[email protected]` | |
| `ALLOWED_HOSTS` | Put here the list of hosts allowed to access the application. Separate with spaces, for instance: `www.timeoverflow.org timeoverflow.org` | `localhost` |
| `RAILS_ENV` | Define the rails environment (not necessary to setup unless you have some special requirements) | `production` |
| `SECRET_KEY_BASE` | Secret key for the application, generate a new one with the command `rails secret` | |
Expand Down Expand Up @@ -96,8 +97,6 @@ In order to configure the application you can use the following ENV variables:
| `AWS_SECRET_ACCESS_KEY` | AWS secret access key (only if `STORAGE_PROVIDER` is `amazon`) | |
| `AWS_BUCKET` | AWS bucket name (only if `STORAGE_PROVIDER` is `amazon`) | |
| `AWS_REGION` | AWS region (only if `STORAGE_PROVIDER` is `amazon`) | |
| `ADMINS` | Space separated list of emails for the superadmins (ie: `[email protected]` | |


## Contributions

Expand Down
4 changes: 0 additions & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ class Application < Rails::Application
# This tells Rails to serve error pages from the app itself, rather than using static error pages in public/
config.exceptions_app = self.routes

# Activate the Skylight agent in staging. You need to provision the
# SKYLIGHT_AUTHENTICATION env var for this to work.
config.skylight.environments += ["staging"]

# ActiveJob configuration
config.active_job.queue_adapter = :sidekiq

Expand Down
6 changes: 0 additions & 6 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ defaults: &defaults
port: <%= ENV.fetch("DATABASE_PORT") { "5432" } %>
template: 'template0'
encoding: unicode
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling

development:
<<: *defaults
Expand All @@ -20,10 +18,6 @@ test:
host: localhost
password: <%= ENV['DATABASE_PASSWORD'] || ENV["POSTGRES_PASSWORD"] %>

staging:
<<: *defaults
database: <%= ENV.fetch('DATABASE_NAME', 'timeoverflow_staging') %>

production:
<<: *defaults
<%= "url: #{ENV['DATABASE_URL']}" if ENV['DATABASE_URL'].present? %>
Expand Down
2 changes: 0 additions & 2 deletions config/environments/staging.rb

This file was deleted.

3 changes: 0 additions & 3 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ development:
test:
secret_key_base: fde628fa241d74a55d7b0fc8fe1b650091e296d6a4d1e51beba3bfa2ed5c143801c28aaadf318aaefc4423bca781f9715441298052b4f704a8c44f97968feb00

staging:
secret_key_base: <%= ENV['SECRET_TOKEN'] %>

production:
secret_key_base: <%= ENV['SECRET_TOKEN'] %>
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
- RAILS_LOG_LEVEL=debug
- REDIS_URL=redis://redis:6379/0
- [email protected]
- STORAGE_PROVIDER=local
ports:
- 3000:3000
depends_on:
Expand All @@ -30,6 +31,7 @@ services:
- RAILS_LOG_LEVEL=debug
- REDIS_URL=redis://redis:6379/0
- [email protected]
- STORAGE_PROVIDER=local
- RUN_SIDEKIQ=true
depends_on:
- db
Expand Down

0 comments on commit 9b957d0

Please sign in to comment.