diff --git a/config/prod.exs b/config/prod.exs index 208cb4c..e46e228 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -6,6 +6,8 @@ import Config # which you should run after static files are built and # before starting your production server. config :cesium_link, CesiumLinkWeb.Endpoint, + url: [scheme: "https", host: "cesium.link", port: 443], + force_ssl: [rewrite_on: [:x_forwarded_proto]], cache_static_manifest: "priv/static/cache_manifest.json" # Do not print debug messages in production diff --git a/fly-prod.toml b/fly-prod.toml new file mode 100644 index 0000000..1f83dc2 --- /dev/null +++ b/fly-prod.toml @@ -0,0 +1,29 @@ +app = "cesium-link-prod" +primary_region = "mad" +kill_signal = "SIGTERM" + +[deploy] + release_command = "/app/bin/migrate" + +[env] + MIX_ENV = "prod" + PHX_HOST = "cesium.link" + PORT = "8080" + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = false + auto_start_machines = true + min_machines_running = 0 + processes = ["app"] + + [http_service.concurrency] + type = "connections" + hard_limit = 1000 + soft_limit = 1000 + +[[vm]] + memory = "512mb" + cpu_kind = "shared" + cpus = 1