You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: laravel/index.html.markerb
+41-20Lines changed: 41 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -38,17 +38,52 @@ You should be able to visit `http://localhost:8000` and see the home page.
38
38
39
39
### Launch
40
40
41
-
Next, we'll use the `launch` command to automagically configure your app for Fly.
42
-
43
-
The `launch` command adds a few files to your code base. Don't worry, it will ask before overwriting anything.
41
+
Next, we'll use the `launch` command to automagically configure your app for Fly and deploy it to the Fly cloud. This will add a few files to your code base--but, don't worry, it will ask before overwriting anything.
44
42
45
43
**If you haven't already, go ahead and run `fly launch`!**
46
44
47
45
```cmd
48
46
fly launch
49
47
```
48
+
This would detect that your project is built with Laravel. Afterwhich it would provide a summary of the default configuration that would be given to your app.
49
+
50
+
```
51
+
We're about to launch your Laravel app on Fly.io. Here's what you're getting:
52
+
53
+
Organization: Personal (fly launch defaults to the personal org)
54
+
Name: fly-lara-app (derived from your directory name)
55
+
Region: Paris, France (this is the fastest region for you)
56
+
App Machines: shared-cpu-1x, 1GB RAM (most apps need about 1GB of RAM)
57
+
Postgres: <none> (not requested)
58
+
Redis: Pay-as-you-go Plan: 10 GB Max Data Size, eviction disabled (determined from app source)
59
+
Tigris: <none> (not requested)
60
+
61
+
? Do you want to tweak these settings before proceeding? (y/N)
62
+
```
63
+
64
+
Extensions like [Postgres](/docs/mpg/overview/) ( database ), [Redis](/docs/upstash/redis/) ( cache ), and [Tigris](/docs/tigris/#main-content-start) ( storage ) can also be added by default based on whether there's an existing, similar connection found for your Laravel project.
50
65
51
-
When asked if you want to deploy now, say **No**.
66
+
<div class="warning icon">
67
+
**Please note** that these extension apps will also incur their own **usage costs**! You can select "y" in order to adjust the default settings and remove any extension you don't need.
68
+
</div>
69
+
70
+
#### Launch Configuration
71
+
Once you accept the configuration, this would proceed with **adding [default secrets](https://github.com/superfly/flyctl/blob/master/scanner/laravel.go#L41-L50)**, **deploying the accepted extensions**, and **generating files** on your project:
72
+
1. `.github/workflows/fly-deploy.yml`, `fly.toml` - Configurations specific to hosting on Fly
73
+
2. [.fly directory](https://github.com/fly-apps/dockerfile-laravel/tree/main/resources/views/fly) - A directory containing configuration files for running Nginx/PHP in a container
74
+
3. [Dockerfile](https://github.com/fly-apps/dockerfile-laravel/blob/main/resources/views/dockerfile.blade.php) - Used to build a container image that is run in fly
75
+
4. [.dockerignore](https://github.com/fly-apps/dockerfile-laravel/blob/main/resources/views/fly/dockerignore.blade.php) - Used to ensure certain files don’t make its way into your image
76
+
77
+
78
+
With the configuration files and extenstion apps in place, an image is built for your app using your project and the Dockerfile generated for it. This image is then finally used to deploy your app.
79
+
80
+
#### Success!
81
+
You should be able to visit `https://your-app-name.fly.dev` and see the Laravel demo home page.
The `fly launch` adds some files to your code base.
85
-
86
-
**Here is what gets added:**
87
-
88
-
1. `Dockerfile` - Used to build a container image that is run in fly
89
-
2. `.dockerignore` - Used to ensure certain files don't make its way into your repository
90
-
3. `fly.toml` - Configuration specific to hosting on Fly
91
-
4. `.fly` (formerly `docker`) - A directory containing configuration files for running Nginx/PHP in a container
92
-
93
114
Running `fly launch` (and later `fly deploy`) uses the `Dockerfile` to build a container image, copying your application files into the resulting image.
94
115
95
116
Fly doesn't care about the state of your git repository - it copies whatever files are present (except for files ignored by `.dockerignore`).
0 commit comments