Skip to content

Commit

Permalink
Remove Redis from the app
Browse files Browse the repository at this point in the history
- removed from docker
- removed from .env files
- removed from Gemfile
- removed from Github CI config
- removed from README

It was no longer needed and it did introduce addtional burden (recent heroku changes broke the app). Once we find a good need for Redis again, we will reintroduce it.
  • Loading branch information
andrzejkrzywda committed Nov 4, 2024
1 parent 7d36a44 commit 20345cb
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 33 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/rails_application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
fail-fast: false
env:
WORKING_DIRECTORY: rails_application
REDIS_TLS_URL: redis://localhost:6379/0
services:
postgres_11:
image: postgres:11
Expand All @@ -20,10 +19,6 @@ jobs:
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis
ports: [ "6379:6379" ]
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
Expand Down Expand Up @@ -57,7 +52,6 @@ jobs:
strategy:
fail-fast: false
env:
REDIS_TLS_URL: redis://localhost:6379/0
WORKING_DIRECTORY: rails_application
services:
postgres_11:
Expand All @@ -68,10 +62,6 @@ jobs:
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis
ports: [ "6379:6379" ]
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
Expand Down
1 change: 0 additions & 1 deletion rails_application/.env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
REDIS_URL=redis://localhost:6379/0
DATABASE_URL=postgres://postgres:secret@localhost/cqrs-es-sample-with-res_development
1 change: 0 additions & 1 deletion rails_application/.env.test
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
REDIS_URL=redis://localhost:6379/0
DATABASE_URL=postgres://postgres:secret@localhost/cqrs-es-sample-with-res_test
1 change: 0 additions & 1 deletion rails_application/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ gem "stimulus-rails"
gem "importmap-rails", "~> 1.1"
gem "rails_event_store", ">= 2.15.0", "< 3.0"
gem 'arbre'
gem 'redis', '~> 5.0'

group :development do
gem "listen", "~> 3.3"
Expand Down
5 changes: 0 additions & 5 deletions rails_application/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,6 @@ GEM
ffi (~> 1.0)
rdoc (6.7.0)
psych (>= 4.0.0)
redis (5.3.0)
redis-client (>= 0.22.0)
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.2)
reline (0.5.9)
io-console (~> 0.5)
Expand Down Expand Up @@ -346,7 +342,6 @@ DEPENDENCIES
puma (~> 5.6)
rails (= 7.2.0)
rails_event_store (>= 2.15.0, < 3.0)
redis (~> 5.0)
skylight
sprockets-rails
stimulus-rails
Expand Down
12 changes: 5 additions & 7 deletions rails_application/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,33 @@

## Setup

### Postgresql and Redis
### Postgresql

#### Docker

If you would like to use Docker image with PostgreSQL and Redis provided by us,
If you would like to use Docker image with PostgreSQL provided by us,
run `docker-compose up -d`. You're done for this step.

#### Installed in the system

If you have PostgreSQL or Redis installed directly in your system and prefer
to use them, create
If you have PostgreSQL installed directly in your system and prefer
to use it, create

- `.env.development.local`
containing:

```
DATABASE_URL=postgresql:///ecommerce_development
REDIS_URL=redis://localhost:6379/1
```

* `.env.test.local` containing:

```
DATABASE_URL=postgresql:///ecommerce_test
REDIS_URL=redis://localhost:6379/1
```

It should would work for most of the cases. If you have more sophisticated setup,
you need to update `DATABASE_URL` and `REDIS_URL` accordingly.
you need to update `DATABASE_URL`.

### Kickstart

Expand Down
9 changes: 1 addition & 8 deletions rails_application/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@ services:
- POSTGRES_DB=cqrs-es-sample-with-res
- POSTGRES_PASSWORD=secret
ports:
- "5432:5432"
redis:
image: 'bitnami/redis:latest'
restart: always
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- "6379:6379"
- "5432:5432"

0 comments on commit 20345cb

Please sign in to comment.