Skip to content

Commit

Permalink
udpate dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Sep 22, 2023
1 parent 5ce8d32 commit fc74a26
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,6 @@ RUN npm install --global yarn
RUN bundle
RUN bundle exec rake assets:precompile

ENTRYPOINT ["/docker-entrypoint.sh"]
COPY ./docker-entrypoint.sh /
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]
5 changes: 3 additions & 2 deletions Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,6 @@ RUN bundle
RUN bundle exec rake assets:precompile

# Run the entrypoint script
COPY ./docker-entrypoint-worker.sh /
ENTRYPOINT ["/docker-entrypoint-worker.sh"]
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["bundle", "exec", "sidekiq", "-C", "config/sidekiq.yml"]
45 changes: 45 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: "3.3"
services:
bulletin:
build:
context: .
dockerfile: Dockerfile
# env_file: .env
environment:
- RAILS_LOG_TO_STDOUT=1
- RAILS_SERVE_STATIC_FILES=1
- RACK_ENV=production
- RAILS_ENV=production
- REDIS_URL=redis://redis:6379
volumes:
- ./docker-entrypoint.sh:/docker-entrypoint.sh
ports:
- "8000:8000"
depends_on:
- redis

worker:
build:
context: .
dockerfile: Dockerfile
# env_file: .env
environment:
- RAILS_LOG_TO_STDOUT=1
- RACK_ENV=production
- RAILS_ENV=production
- REDIS_URL=redis://redis:6379
command: ""
volumes:
- ./docker-entrypoint.sh:/docker-entrypoint.sh
command: "bundle exec sidekiq -C config/sidekiq.yml"
depends_on:
- redis

redis:
image: "redis:alpine"
command: redis-server
volumes:
- redis_data:/data

volumes:
redis_data:
7 changes: 0 additions & 7 deletions docker-entrypoint-worker.sh

This file was deleted.

0 comments on commit fc74a26

Please sign in to comment.