Skip to content

Commit

Permalink
resolve merge conflict with myself
Browse files Browse the repository at this point in the history
  • Loading branch information
andie787 committed Aug 23, 2024
2 parents ba09980 + eb92552 commit faac4f7
Show file tree
Hide file tree
Showing 37 changed files with 205 additions and 105 deletions.
2 changes: 1 addition & 1 deletion about/extensions.html.markerb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Fly.io is a global cloud service for running full stack apps close to users. We

We have two main goals: to deliver a slick developer experience, and to build the best possible platform for running full stack apps. We're looking for partners that share this goal, extending Fly.io with services our customers need.

Services such as managed databases, exception handlers, CI runners or log aggregators are great examples. Check out our [managed Upstash for Redis](https://fly.io/docs/reference/redis/) to get an idea of what's possible, and how we integrate services directly into our CLI.
Services such as managed databases, exception handlers, CI runners or log aggregators are great examples. Check out our [managed Upstash for Redis](https://fly.io/docs/upstash/redis/) to get an idea of what's possible, and how we integrate services directly into our CLI.

[Check out our documentation](https://fly.io/docs) to see what our platform has to offer. Contact us at [[email protected]](mailto:[email protected]) to discuss your case!

Expand Down
4 changes: 2 additions & 2 deletions about/pricing.html.markerb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ You're not billed for the following types of traffic:
- all inbound data transfer
- data transfer between apps or Machines in the same region (for organizations using granular data transfer rates)
- data transfer from apps without an assigned IP address (for organizations not using granular data transfer rates)
- data transfer to [Tigris Object Storage](https://fly.io/docs/reference/tigris)
- data transfer to [Tigris Object Storage](https://fly.io/docs/tigris/)

Fly.io pricing is per region group for outbound data transfer. You'll see a more detailed breakdown of cost per region and per traffic type on your monthly invoice.

Expand Down Expand Up @@ -274,7 +274,7 @@ The [Machine price](#compute) and [volume price](#persistent-storage-volumes) fo

## Extensions

Fly.io offers managed services operated by third parties, such as [Tigris Object Storage](/docs/reference/tigris), [Supabase Postgres](/docs/reference/supabase) and [Upstash Redis](/docs/reference/redis).
Fly.io offers managed services operated by third parties, such as [Tigris Object Storage](/docs/tigris), [Supabase Postgres](/docs/rsupabase/) and [Upstash Redis](/docs/upstash/redis/).

When you provision their services, you become their customer, and you pay their list prices via your monthly Fly.io bill. Charges are updated daily in your Fly.io dashboard.

Expand Down
58 changes: 31 additions & 27 deletions apps/going-to-production.html.markerb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Going to production
title: Going to production checklist
layout: docs
nav: apps
redirect_from:
Expand All @@ -9,66 +9,70 @@ redirect_from:
- /docs/reference/going-to-production/
---

This document lists important topics to consider when you set up a production environment on Fly.io. What makes an app production-ready can vary from one framework to another. The following topics and linked resources can help you understand when and why you might need specific features or configuration.
This checklist guides you through setting up a production environment on Fly.io. What makes an app production-ready can vary from one framework to another. You'll need to decide what checklist items will work for you; not all of the items will apply to your app and there may be other considerations not listed here.

<div class="important icon">
**Important:** This list is neither exhaustive nor mandatory, and does not guarantee production-readiness for your app. Some apps might have unique requirements for production.
**Important:** This list is neither exhaustive nor mandatory, and does not guarantee production-readiness for your app. Apps might have unique requirements for production.
</div>

## Security

- **Set up single sign-on for organizations:** Enable SSO on your organization to take advantage of Google or GitHub authentication security. See [Single sign-on for organizations](/docs/security/sso/).

- **Use Arcjet application security for JavaScript apps:** Secure your app with rate limiting, bot protection, email validation, and defense against common attacks through our extension partner Arcjet. Currently [free in beta](/docs/reference/arcjet/#pricing), but pricing is subject to change. See [Application Security by Arcjet](/docs/reference/arcjet/).
- **Isolate staging and production environments:** Use organizations to limit access to your production environment. See [Blueprint: Staging and production isolation](/docs/blueprints/staging-prod-isolation/).

- **Enforce least privilege access:** Use access tokens to allow only the minimum access required by team members to your organization, apps, and Machines. See [access tokens](https://fly.io/docs/security/tokens/).

- **Protect sensitive information:** Set secrets to store sensitive data and make them available as environment variables to your app. See [Secrets and Fly Apps](/docs/apps/secrets/).

- **Make sure private services are not exposed:** Check that your private apps with services don't have public IP addresses. Run `fly ips list` and use `fly ips release` to release unnecessary public IPs. See flyctl [`fly ips` commands](/docs/flyctl/ips/).
- **Make sure private services are not exposed:** Check that your private apps with services don't have public IP addresses. Run `fly ips list` and use `fly ips release` to release unnecessary public IPs. See flyctl [`fly ips` commands](/docs/flyctl/ips/). Assign private apps a [Flycast address](https://fly.io/docs/networking/flycast/) instead.

- **Isolate staging and production environments:** Use organizations to limit access to your production environment. See [Blueprint: Staging and production isolation](/docs/blueprints/staging-prod-isolation/).
- **Use Arcjet application security for JavaScript apps:** Secure your app with rate limiting, bot protection, email validation, and defense against common attacks through our extension partner Arcjet. Currently [free in beta](/docs/security/arcjet/#pricing), but pricing is subject to change. See [Application Security by Arcjet](/docs/security/arcjet/).

## Networking

- **Set up a custom domain:** Configure a certificate for your domain. See [Use a custom domain](/docs/networking/custom-domain/).

- **Consider a dedicated IPv4 address:** Completely eliminate the chance of blacklisted spammers causing problems for your app. There is a small [added cost](/docs/about/pricing/#anycast-ip-addresses) for dedicated IPv4 addresses. See [Dedicated IPv4](/docs/networking/services/#dedicated-ipv4).

- **Set up Flycast for private apps**: If you haven't already done so, give your private apps a Flycast address to communicate with them entirely on your private network. See [Flycast - Private Fly Proxy services](https://fly.io/docs/networking/flycast/).

## Databases

- **Run "production-grade" Postgres:** For Fly Postgres, our unmanaged database, set up replication clusters of 3+ servers. See [High Availability & Global Replication](/postgres/advanced-guides/high-availability-and-global-replication/). You can also use an external database provider and configure it for redundancy.

- **Set up offsite backups:** Consider offsite backups for your database.
- **Set up offsite backups:** For all databases, it's essential to have a recovery plan that includes storing backups offsite.

- **LiteFS**: LiteFS is a distributed file system that transparently replicates SQLite databases. See the [LiteFS docs](/docs/litefs/).

## Monitoring

- **Export your logs:** Set up the Fly Log Shipper to aggregate your app’s logs to a service of your choice. See [Export logs](/docs/monitoring/exporting-logs/).

- **Use Sentry for Error tracking**: An application monitoring platform that helps you identify and fix software problems before they impact your users from our extension partner Sentry.Fly.io organizations get a year's worth of [Team Plan](https://sentry.io/pricing/+external) credits. See [Application Monitoring by Sentry](/docs/reference/sentry/).

- **Use Sentry for Error tracking**: An application monitoring platform that helps you identify and fix software problems before they impact your users from our extension partner Sentry.Fly.io organizations get a year's worth of [Team Plan](https://sentry.io/pricing/+external) credits. See [Application Monitoring by Sentry](/docs/monitoring/sentry/).

## Availability and resiliency
## Availability, resiliency, and costs

- **Use multiple Machines for resiliency:** Make your app resilient to single-host failures with multiple Machines that stay stopped until you need them. See [Blueprint: Resilient apps use multiple Machines](/docs/blueprints/resilient-apps-multiple-machines/).

- **Set up autoscaling by load or metric:** Use Fly Proxy autostop/autostart or the metrics-based autoscaler app. See [Autoscaling](/docs/reference/autoscaling/).
- **Add regions:** Scale your app in multiple regions closest to your app's users. See [Scale an app's regions](/docs/launch/scale-count/#scale-an-apps-regions).

## CI/CD
- **Refine the default autostop/autostart settings**: Autostop/autostart lets you stop or suspend Machines when there's low traffic, saving on resource usage and costs. You get autostop/autostart by default with a new app, but you can configure it to optimize for your use case. See [Autostop/autostart Machines](/docs/launch/autostop-autostart/).

- **Deploy with GitHub Actions:** Set up your app for continuous deployment to Fly.io from the app’s GitHub repository. See [Continuous Deployment with Fly.io and GitHub Actions](/docs/app-guides/continuous-deployment-with-github-actions/).

- **Generate review apps with GitHub Actions:** Automatically generate ephemeral review apps on Fly.io for each pull request (PR) using GitHub Actions. See [Blueprint: Git Branch Preview Environments on GitHub](/docs/blueprints/review-apps-guide/).
- **Set up autoscaling by metric:** For apps that aren't running web services, use the autoscaler app to scale your app's Machines based on any metric, saving on resource usage and costs. See [Autoscale based on metrics](/docs/launch/autoscale-by-metric/).

## Networking

- **Set up a custom domain:** Configure a certificate for your domain. See [Use a custom domain](/docs/networking/custom-domain/).
## App performance

- **Consider a dedicated IPv4 address:** Completely eliminate the chance of blacklisted spammers causing problems for your app. There is a small [added cost](/docs/about/pricing/#anycast-ip-addresses) for dedicated IPv4 addresses. See [Dedicated IPv4](/docs/networking/services/#dedicated-ipv4).
- **Get Machine sizing right:** Most production apps require 2x or performance CPUs. Also make sure you have enough RAM for your app and/or enable [swapping to disk](https://fly.io/docs/reference/configuration/#swap_size_mb-option) to deal with brief spikes in memory use. See [Machine sizing](docs/machines/guides-examples/machine-sizing/).

- **Fine-tune your app:** Learn about optimizing your app on Fly.io. See [Tips to fine-tune and your app on Fly.io](/docs/reference/fine-tune-apps/).

## Fine-tuning your app
## CI/CD

- **Get Machine sizing right:** Most production apps require 2x or performance CPUs. Also make sure you have enough RAM for your app and/or enable [swapping to disk](https://fly.io/docs/reference/configuration/#swap_size_mb-option) to deal with brief spikes in memory use. See [Machine sizing](docs/machines/guides-examples/machine-sizing/).
- **Generate review apps with GitHub Actions:** Automatically generate ephemeral review apps on Fly.io for each pull request (PR) using GitHub Actions. See [Blueprint: Git Branch Preview Environments on GitHub](/docs/blueprints/review-apps-guide/).

- **Fine-tune and benchmark your app:** Learn about optimizing your app on Fly.io. See [Tips to fine-tune and (not) benchmark your app on Fly.io](/docs/reference/fine-tune-apps/).
- **Deploy with GitHub Actions:** Set up your app for continuous deployment to Fly.io from the app’s GitHub repository. See [Continuous Deployment with Fly.io and GitHub Actions](/docs/app-guides/continuous-deployment-with-github-actions/).

## Support
## Get support

Check out our [community](https://community.fly.io/) to get help and answers.
- **Community:** Check out our [community](https://community.fly.io/) to get help and answers.

Get email support with a [Launch, Scale, or Enterprise plan](https://fly.io/plans).
- **Consider a plan for email support:** You get email support with a [Launch, Scale, or Enterprise plan](https://fly.io/plans).
2 changes: 1 addition & 1 deletion apps/move-app-org.html.markerb
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ The following app resources are transferred to the new org automatically:

The following extension services need to be reconfigured for the app after the move:

- **[Upstash for Redis](https://fly.io/docs/reference/redis/):** Upstash Redis is only available over an organization's private network. After you move the app, you'll need to provision a new database for the new org.
- **[Upstash for Redis](https://fly.io/docs/upstash/redis/):** Upstash Redis is only available over an organization's private network. After you move the app, you'll need to provision a new database for the new org.
2 changes: 1 addition & 1 deletion apps/trouble-host-unavailable.html.markerb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Volumes are pinned to physical hosts, so when there's a host outage the volume i

If you're running a high availability Postgres cluster with multiple nodes, a host issue impacting one of your nodes shouldn't cause an issue; by default we run each node on a separate host. If the host your primary node is on goes down, the cluster will fail over to a healthy node.

However, if your database is running on a single Machine, and you don’t have any replicas to fail over to, then you won’t be able to connect during the host outage. Similar to the single volume steps above, you can create a new Postgres app from your most recent volume snapshot using `fly postgres create --snapshot-id <snapshot_id>`. See [Backup, restores, & snapshots](/docs/postgres/managing/backup-and-restore/) for details.
However, if your database is running on a single Machine, and you don’t have any replicas to fail over to, then you won’t be able to connect during the host outage. Similar to the single volume steps above, you can create a new Postgres app from your most recent volume snapshot using `fly postgres create --snapshot-id <snapshot_id> --image-ref <image-version>`. See [Backup, restores, & snapshots](/docs/postgres/managing/backup-and-restore/) for details.

## Prevent downtime when there's a single host issue

Expand Down
4 changes: 2 additions & 2 deletions blueprints/cell-based.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ likely make use of one or more of the following:
addresses many problems, it doesn't help deal with logs that are missing due
to application or network problems. Consider having applications emit a
heartbeat, and write monitoring software that looks for missing heartbeats
and reports them as issues. [Sentry](https://fly.io/docs/reference/sentry/)
and reports them as issues. [Sentry](https://fly.io/docs/monitoring/sentry/)
can help here.
* While applying updates when all of the services for a single Machine are
self contained is an easier problem then upgrading potentially
Expand Down Expand Up @@ -251,7 +251,7 @@ As mentioned above, backups are crucial. Items to explore:
* [Rsync](https://rsync.samba.org/) is a utility available with Linux
distributions that can be used to efficiently copy changes between Machines.
* Use a traditional database.
[Supabase](https://fly.io/docs/reference/supabase/), for example, supports
[Supabase](https://fly.io/docs/supabase/), for example, supports
[custom
claims](https://github.com/supabase-community/supabase-custom-claims) that
can be used to build a multi-tenancy option for your database.
Expand Down
6 changes: 3 additions & 3 deletions database-storage-guides.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ The Fly Machines in your app provide ephemeral storage, so you get a blank slate

_Object storage service from our extension partners._

- **[Tigris Global Object Storage](/docs/reference/tigris/)** - [Tigris](https://www.tigrisdata.com/+external) is a globally distributed S3-compatible object storage service on Fly.io infrastructure.
- **[Tigris Global Object Storage](/docs/tigris/)** - [Tigris](https://www.tigrisdata.com/+external) is a globally distributed S3-compatible object storage service on Fly.io infrastructure.

---

## Managed database services

_Managed database services from our extension partners._

- **[Supabase Postgres (public alpha)](/docs/reference/supabase/)** - [Supabase](https://supabase.com/database+external) Postgres is a full-featured and fully-managed Postgres database on Fly.io infrastructure.
- **[Supabase Postgres (public alpha)](/docs/supabase/)** - [Supabase](https://supabase.com/database+external) Postgres is a full-featured and fully-managed Postgres database on Fly.io infrastructure.

- **[Upstash for Redis](/docs/reference/redis/)** - [Redis](https://redis.io/+external) is an in-memory database commonly used for caching. A managed service by [Upstash](https://upstash.com/+external).
- **[Upstash for Redis](/docs/upstash/redis/)** - [Redis](https://redis.io/+external) is an in-memory database commonly used for caching. A managed service by [Upstash](https://upstash.com/+external).

---

Expand Down
1 change: 1 addition & 0 deletions flyctl/cmd/fly_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fly deploy [WORKING_DIRECTORY] [flags]
-c, --config string Path to application configuration file
--deploy-retries string Number of times to retry a deployment if it fails (default "auto")
--depot Deploy using depot to build the image
--depot-scope string The scope of the Depot builder's cache to use (org or app) (default "org")
--detach Return immediately instead of monitoring deployment progress
--dns-checks Perform DNS checks during deployment (default true)
--dockerfile string Path to a Dockerfile. Defaults to the Dockerfile in the working directory.
Expand Down
1 change: 1 addition & 0 deletions flyctl/cmd/fly_launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fly launch [flags]
--copy-config Use the configuration file if present without prompting
--deploy-retries string Number of times to retry a deployment if it fails (default "auto")
--depot Deploy using depot to build the image
--depot-scope string The scope of the Depot builder's cache to use (org or app) (default "org")
--detach Return immediately instead of monitoring deployment progress
--dns-checks Perform DNS checks during deployment (default true)
--dockerfile string Path to a Dockerfile. Defaults to the Dockerfile in the working directory.
Expand Down
2 changes: 1 addition & 1 deletion happy-path/tigris.html.markerb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nav: demo
order: 6
---

[Tigris](https://fly.io/docs/reference/tigris/) is a globally distributed object storage service. It essentially requires no configuration, and seamlessly handles multi-regions. If you upload an audio file to a host in Virginia, you can access it from Amsterdam. Even better: subsequent accesses from regions other than the primary region are served locally.
[Tigris](https://fly.io/docs/tigris/) is a globally distributed object storage service. It essentially requires no configuration, and seamlessly handles multi-regions. If you upload an audio file to a host in Virginia, you can access it from Amsterdam. Even better: subsequent accesses from regions other than the primary region are served locally.

Unlike relational databases, there may be reasons why you want to make your object store available via the internet. In this demo, the object store starts out private, but you can make it [public](/docs/tigris/#public-buckets) if you want.

Expand Down
Loading

0 comments on commit faac4f7

Please sign in to comment.