mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Revert "Setup config for deploying both worker and web (#362)"
This reverts commit 7c5b869bce.
This commit is contained in:
@@ -74,6 +74,6 @@ USER 1000:1000
|
||||
# Entrypoint prepares the database.
|
||||
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
|
||||
|
||||
# Start either web server or job worker based on PROCESS_TYPE env var
|
||||
# Start either web server or job worker based on WORKER env var
|
||||
EXPOSE 80
|
||||
CMD ["./bin/start-process"]
|
||||
CMD ["./bin/thrust", "./bin/rails", "server"]
|
||||
|
||||
2
Procfile
2
Procfile
@@ -1,2 +0,0 @@
|
||||
web: bundle exec rails server -b 0.0.0.0 -p $PORT
|
||||
worker: bundle exec good_job start
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Start the appropriate process based on PROCESS_TYPE environment variable
|
||||
case "$PROCESS_TYPE" in
|
||||
web)
|
||||
echo "Starting web server..."
|
||||
exec ./bin/thrust ./bin/rails server -b 0.0.0.0 -p ${PORT:-80}
|
||||
;;
|
||||
worker)
|
||||
echo "Starting GoodJob worker..."
|
||||
exec bundle exec good_job start
|
||||
;;
|
||||
*)
|
||||
echo "Unknown PROCESS_TYPE: $PROCESS_TYPE"
|
||||
echo "Valid options: web, worker"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -9,7 +9,7 @@ Rails.application.configure do
|
||||
config.good_job.poll_interval = -1 # Disable polling
|
||||
config.good_job.execution_mode = :inline # Run jobs inline in development
|
||||
else
|
||||
config.good_job.execution_mode = :external
|
||||
config.good_job.execution_mode = :async
|
||||
end
|
||||
|
||||
config.good_job.enable_cron = Rails.env.production?
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
- PROCESS_TYPE=web
|
||||
- PORT=80
|
||||
- RAILS_ENV=production
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- RAILS_MASTER_KEY=${RAILS_MASTER_KEY}
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- worker
|
||||
|
||||
worker:
|
||||
build: .
|
||||
environment:
|
||||
- PROCESS_TYPE=worker
|
||||
- RAILS_ENV=production
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- RAILS_MASTER_KEY=${RAILS_MASTER_KEY}
|
||||
# No ports exposed for worker
|
||||
Reference in New Issue
Block a user