diff --git a/assignment-service/fly.toml b/assignment-service/fly.toml index 57b865f..dc1b81f 100644 --- a/assignment-service/fly.toml +++ b/assignment-service/fly.toml @@ -1,4 +1,4 @@ -# fly.toml app configuration file generated for assignment-service on 2025-04-24T11:48:54-07:00 +# fly.toml app configuration file generated for assignment-service on 2025-05-09T00:17:41-07:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # @@ -8,42 +8,40 @@ primary_region = 'sea' [build] -[env] - PORT = '8080' - FLY_ORG="personal" - COMMON_BUCKET="snakeapi-deployment-test-bucket" - AWS_ACCESS_KEY_ID="tid__NSmOVaGknqitaCySppZjqVTgJSdDFnFbWcQllkC_juHwkbQZO" - AWS_SECRET_ACCESS_KEY="tsec_6Bz1aMbfYQftuq5WfIVEDZkHwskU4MMjVywdtxSP6uxetEBvkSC2VHI9HfTeDgHr4D6kiz" - AWS_ENDPOINT_URL_S3="https://fly.storage.tigris.dev" - AWS_REGION="auto" - FLY_API_BASE_URL = "https://api.machines.dev/v1" +[build] +# Only needed if you're using a Dockerfile — can be empty if using buildpacks or Node preset -[http_service] - internal_port = 8080 - force_https = true - auto_stop_machines = 'stop' - auto_start_machines = true - min_machines_running = 1 - processes = ['app'] +# Removed the [http_service] section to disable public HTTP/HTTPS access +# [http_service] +# internal_port = 3000 +# force_https = true +# auto_stop_machines = true +# auto_start_machines = true +# min_machines_running = 0 +# processes = ["app"] [[services]] - protocol = 'tcp' + protocol = "tcp" internal_port = 8080 + internal_only = true # Makes this service only accessible internally + auto_start_machines = true + auto_stop_machines = true - [[services.ports]] - port = 80 - handlers = ['http'] + # Removed public port exposure + # [[services.ports]] + # port = 80 + # handlers = ["http"] - [[services.ports]] - port = 443 - handlers = ['tls', 'http'] + # [[services.ports]] + # port = 443 + # handlers = ["tls", "http"] - [[services.tcp_checks]] - interval = '10s' - timeout = '2s' - grace_period = '5s' + [services.concurrency] + type = "requests" + hard_limit = 1000 + soft_limit = 500 [[vm]] memory = '1gb' - cpu_kind = 'shared' + cpu_kind = "shared" cpus = 1 diff --git a/deployment-service/Dockerfile b/deployment-service/Dockerfile index a4a7a20..cbe3958 100644 --- a/deployment-service/Dockerfile +++ b/deployment-service/Dockerfile @@ -9,5 +9,5 @@ COPY snakeapi_service ./snakeapi_service ENV FLY_ACCESS_TOKEN="FlyV1 fm2_lJPECAAAAAAACJJHxBAjRF69RAjf3FXXuVT+M3bcwrVodHRwczovL2FwaS5mbHkuaW8vdjGUAJLOAA//nh8Lk7lodHRwczovL2FwaS5mbHkuaW8vYWFhL3YxxDxmIdNTu/DGjUSyYxuC5W7Rio4bNT5w6c1Ihi+ZJnjcmEutbt5KuyFcCo1C0CFPEhrP4hY5SEvXN58GHUDEToWZ0GwI5ndmIsZnhWSG8TBixbuFTaBb8lTBU5lNOvm2l4rX1i6dfId7S9Ko6qXpOzl9oYngy0zw+g2MwXuQrH6/XELBdEy/KThVeTEjt8QgBzOo/Eae+DsrATm6WjVv9f5a4iS/s7WtYHydZZr3z9M=,fm2_lJPEToWZ0GwI5ndmIsZnhWSG8TBixbuFTaBb8lTBU5lNOvm2l4rX1i6dfId7S9Ko6qXpOzl9oYngy0zw+g2MwXuQrH6/XELBdEy/KThVeTEjt8QQNZaUoOrVdOnk6Vo/DkeMGsO5aHR0cHM6Ly9hcGkuZmx5LmlvL2FhYS92MZgEks5oGwzFzwAAAAEkEyrjF84AD2FZCpHOAA9hWQzEEASQrBHkPDFO3LlZDaxRRIjEIEW1ki/syKHnhFamHgze8PFeunPOAmNmh57hslV04lL7" -EXPOSE 3006 +EXPOSE 8080 CMD ["node", "src/index.js"] diff --git a/deployment-service/fly.toml b/deployment-service/fly.toml index 6f3da2a..348b310 100644 --- a/deployment-service/fly.toml +++ b/deployment-service/fly.toml @@ -14,6 +14,38 @@ primary_region = 'sea' IMAGE_REF="registry.fly.io/snake-api-template:latest" FLY_API_BASE_URL = "https://api.machines.dev/v1" -[http_service] - internal_port = 3006 - force_https = true + +# Removed the [http_service] section to disable public HTTP/HTTPS access +# [http_service] +# internal_port = 3000 +# force_https = true +# auto_stop_machines = true +# auto_start_machines = true +# min_machines_running = 0 +# processes = ["app"] + +[[services]] + protocol = "tcp" + internal_port = 8080 + internal_only = true # Makes this service only accessible internally + auto_start_machines = true + auto_stop_machines = true + + # Removed public port exposure + # [[services.ports]] + # port = 80 + # handlers = ["http"] + + # [[services.ports]] + # port = 443 + # handlers = ["tls", "http"] + + [services.concurrency] + type = "requests" + hard_limit = 1000 + soft_limit = 500 + +[[vm]] + memory = '1gb' + cpu_kind = "shared" + cpus = 1