Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ops: production environment #72

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading