-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add compose file for testing prod on local
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |