diff --git a/Dockerfile b/Dockerfile index 1e84b177c..8443899e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -99,8 +99,9 @@ COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}" COPY --from=build /app /app RUN rm -rf /app/tmp/cache /app/tmp/pids /app/tmp/sockets /app/log +RUN mkdir /app/tmp/pids -EXPOSE 80 +EXPOSE 3000 # Entrypoint script always runs, even if command is overwritten ENTRYPOINT ["/app/config/docker/entrypoint.sh"] diff --git a/fly.toml b/fly.toml index adfa8c488..fc7e8cc74 100644 --- a/fly.toml +++ b/fly.toml @@ -28,12 +28,29 @@ RAILS_MIN_THREADS = "5" RAILS_SERVE_STATIC_FILES = "enabled" REDIS_PROVIDER = "REDIS_SIDEKIQ_URL" SIDEKIQ_CONCURRENCY = "5" -WEB_CONCURRENCY = "4" +WEB_CONCURRENCY = "3" [processes] -# web = "bundle exec puma" +web = "bundle exec puma" worker = "bundle exec sidekiq" +[http_service] +internal_port = 3000 +processes = ["web"] +force_https = true +auto_stop_machines = "suspend" +auto_start_machines = true +min_machines_running = 1 +[http_service.concurrency] +type = "requests" +soft_limit = 20 +hard_limit = 40 +[[http_service.checks]] +grace_period = "30s" +interval = "30s" +method = "GET" +timeout = "5s" +path = "/" [[vm]] memory = '512mb' @@ -41,8 +58,8 @@ cpu_kind = 'shared' cpus = 1 processes = ["worker"] -# [[vm]] -# memory = '1GB' -# cpu_kind = 'shared' -# cpus = 1 -# processes = ["web"] +[[vm]] +memory = '1GB' +cpu_kind = 'shared' +cpus = 4 +processes = ["web"]