Skip to content

Commit

Permalink
ops: production environment (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodiaslobo authored Aug 22, 2024
1 parent d2c5d93 commit c1a317b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions fly-prod.toml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c1a317b

Please sign in to comment.