Skip to content

Commit

Permalink
add compose file for testing prod on local
Browse files Browse the repository at this point in the history
  • Loading branch information
loftwah committed Aug 24, 2024
1 parent 7a006af commit 43ba1e0
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
services:
app:
build: . # This tells Docker Compose to build the image from the Dockerfile in the current directory
ports:
- "80:3000"
env_file:
- .env
environment:
- RAILS_ENV=production
- REDIS_URL=redis://redis:6379/0
volumes:
- ./storage:/rails/storage
depends_on:
- redis

redis:
image: redis:6-alpine
volumes:
- redis_data:/data

sidekiq:
build: . # Same as above, using the Dockerfile in the current directory
command: bundle exec sidekiq
env_file:
- .env
environment:
- RAILS_ENV=production
- REDIS_URL=redis://redis:6379/0
volumes:
- ./storage:/rails/storage
depends_on:
- redis

volumes:
redis_data:

0 comments on commit 43ba1e0

Please sign in to comment.