Skip to content

Commit 8bc61c1

Browse files
committed
Update Quick-Start documentation
1 parent 1950e22 commit 8bc61c1

File tree

3 files changed

+56
-43
lines changed

3 files changed

+56
-43
lines changed
Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Quick Start Guide
33
description: The official documentation for UserFrosting, a PHP framework and full-featured user management application.
4-
obsolete: true
54
---
65

76
UserFrosting is a free, open-source jumping-off point for building user-centered web applications with PHP and Javascript. It comes with a sleek, modern interface, basic user account features, and an administrative user management system - all fully functioning out of the box.
@@ -10,49 +9,59 @@ UserFrosting is a free, open-source jumping-off point for building user-centered
109
> This quick start guide is aimed at experienced PHP developers who already have a development environment set up. If that's not your case, head over to the [First Chapter](background) to start your journey.
1110
1211
> [!IMPORTANT]
13-
> This is the documentation for **UserFrosting 5**. If you are looking for documentation for _UserFrosting 4_, [click here](https://learn.userfrosting.com/4.6/).
12+
> This is the documentation for **UserFrosting 6**. If you are looking for documentation for _UserFrosting 5_, [click here](https://learn.userfrosting.com/5.1/).
1413
1514
## Requirements
1615

1716
> [!TIP]
18-
> Using Docker? [Check out the Docker Documentation](installation/environment/docker) to install UserFrosting through it's native Docker integration.
17+
> Using Docker? [Check out the Docker Documentation](installation/environment/docker) to install UserFrosting through its native Docker integration.
1918
2019
UserFrosting has a few system requirements. You need to make sure your local UserFrosting development environment meets the following requirements:
2120

22-
- PHP **8.1 or higher** (*8.3* recommended)
21+
- PHP **8.1 or higher** (*8.4* recommended)
2322
- [Composer 2](https://getcomposer.org/)
24-
- [Node.js](https://nodejs.org/en/) **18.0** or higher, and [npm](https://www.npmjs.com) **9.0** or higher
23+
- [Node.js](https://nodejs.org/en/) **18.0** or higher (*24 LTS* recommended)
24+
- [npm](https://www.npmjs.com) **9.0** or higher
2525

2626
## Installing UserFrosting
2727

28-
Use Composer to create an empty project with the latest version of UserFrosting skeleton into a new `UserFrosting` folder. This will clone the skeleton repository and run the installation process.
28+
Use Composer to create a new project with the latest version of UserFrosting into a `UserFrosting` folder. This will clone the skeleton repository and run the installation process.
2929

3030
```bash
31-
composer create-project userfrosting/userfrosting UserFrosting "^5.1"
31+
composer create-project userfrosting/userfrosting UserFrosting "^6.0-beta"
3232
```
3333

3434
> [!TIP]
35-
> During installation, you can choose **sqlite** as database provider if you don't have a database provider available.
35+
> During installation, you can choose **SQLite** as the database provider if you don't have a database server available.
3636
37-
If any dependencies are not met, an error will occur. Simply try again after fixing said error, or manually run `composer install` and `php bakery bake` from the install directory. For more information about the `bake` command, head to the [Bakery CLI](cli) chapter.
37+
If any dependencies are not met, an error will occur. Simply try again after fixing the error, or manually run `composer install` and `php bakery bake` from the installation directory. For more information about the `bake` command, see the [Bakery CLI](cli) chapter.
3838

39-
At this point you can run locally using the PHP Server :
39+
At this point, you can run the application locally using the PHP and Vite development servers. First, change to the project directory:
4040

4141
```bash
4242
cd UserFrosting
4343
```
44+
45+
Now, in two separate terminals, run each server simultaneously:
46+
47+
*First Terminal:*
4448
```bash
4549
php bakery serve
4650
```
4751

48-
You can now access UserFrosting at : [http://localhost:8080](http://localhost:8080)
52+
*Second Terminal:*
53+
```bash
54+
npm run vite:dev
55+
```
56+
57+
You can now access UserFrosting at: [http://localhost:8080](http://localhost:8080)
4958

50-
## Visit your website
59+
## Visit Your Website
5160

52-
At this point, you should be able to access your application. You should see a basic page:
61+
At this point, you should be able to access your application. You should see the default front page:
5362

5463
![Basic front page of a UserFrosting installation](images/front-page.png)
5564

56-
## What's next...
65+
## What's Next
5766

58-
For more detailed information about installing UserFrosting, or if you need help with the basic setup requirements, check out the [Installation Chapter](installation). Otherwise, head over to the [Sprinkles Chapter](sprinkles).
67+
For more detailed information about installing UserFrosting, or if you need help with the basic setup requirements, check out the [Installation Chapter](installation). Otherwise, head over to the [Sprinkles Chapter](sprinkles) to learn about UserFrosting's modular architecture.

app/pages/6.0/04.installation/02.environment/02.docker/docs.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ description: Docker is a containerization platform that helps maintain consisten
44
obsolete: true
55
---
66

7-
If you don't already have a local environment or you're not familiar with **Docker**, this page will guide you in installing UserFrosting using Docker.
7+
If you don't already have a local development environment set up, this page will guide you through installing UserFrosting using Docker.
88

9-
Docker provides a great starting point for building a UserFrosting application using PHP, NGINX, and MySQL without requiring prior Docker experience. All the necessary tools will be available through Docker. The only necessary tool required on your computer, besides Docker, is the **command line**.
9+
Docker provides a great starting point for building a UserFrosting application using PHP, NGINX, and MySQL without requiring prior Docker experience. All the necessary tools will be available through Docker. The only tool required on your computer, besides Docker, is access to the **command line**.
1010

1111
If you're familiar with PHP development, or already have PHP installed locally, you may instead want to consider setting up [natively](installation/environment/native).
1212

1313
## Command Line Interface
1414

15+
<!-- TODO Inject the content directly here -->
1516
[plugin:content-inject](04.installation/_modular/cli)
1617

1718
## Install Docker
@@ -25,7 +26,7 @@ First, you'll need to install Docker. Just follow the installation instructions
2526
For the next part, you'll need to use the command line. We'll use Composer (through a Docker image) to create an empty project, with the latest version of the UserFrosting skeleton, into a new `UserFrosting` subdirectory:
2627

2728
```bash
28-
docker run --rm -it -v "$(pwd):/app" composer create-project userfrosting/userfrosting UserFrosting "^5.1" --no-scripts --no-install --ignore-platform-reqs
29+
docker run --rm -it -v "$(pwd):/app" composer create-project userfrosting/userfrosting UserFrosting "^6.0-beta" --no-scripts --no-install --ignore-platform-reqs
2930
```
3031

3132
> [!TIP]
@@ -42,56 +43,59 @@ Now it's simply a matter of navigating to the directory containing the source co
4243
```
4344

4445
> [!TIP]
45-
> If you customized `UserFrosting` in the previous command, don't forget to change it in the command above.
46+
> If you customized `UserFrosting` in the previous command, don't forget to change it in the command above.
4647
4748
2. Build each of the Docker Containers (this might take a while):
4849

4950
```bash
5051
docker-compose build --no-cache
5152
```
5253

53-
3. Start each Docker Container:
54+
3. Copy the `.env` template
55+
```bash
56+
cp app/.env.docker app/.env
57+
```
58+
59+
4. Start each Docker Container:
5460

5561
```bash
5662
docker-compose up -d
5763
```
5864

59-
4. Set some directory permissions (your may have to enter your root password):
65+
5. Set some directory permissions (you may have to enter your root password):
6066

6167
```bash
6268
sudo touch app/logs/userfrosting.log
6369
sudo chown -R $USER: .
6470
sudo chmod 777 app/{logs,cache,sessions}
6571
```
6672

67-
5. Install PHP dependencies:
73+
6. Install PHP dependencies:
6874

6975
```bash
7076
docker-compose exec app composer update
7177
```
7278

73-
6. Install UserFrosting (database configuration and migrations, creation of admin user, etc.). You'll need to provide info to create the admin user:
79+
7. Install UserFrosting (database configuration and migrations, creation of admin user, etc.). You'll need to provide info to create the admin user:
7480

7581
```bash
7682
docker-compose exec app php bakery bake
7783
```
7884

7985
Now visit [http://localhost:8080](http://localhost:8080) to see your UserFrosting homepage!
8086

81-
You should see the default UserFrosting pages and be able to login with the newly created master account.
87+
You should see the default UserFrosting pages and be able to log in with the newly created admin account.
8288

83-
![Basic front page of a UserFrosting installation](images/front-page.png)
89+
![Basic front page of a UserFrosting installation](/images/front-page.png)
8490

85-
To stop the containers, run :
91+
To stop the containers, run:
8692

8793
```bash
8894
docker-compose stop
8995
```
9096

9197
## Mailpit
9298

93-
You can see captured email at [http://localhost:8025](http://localhost:8025).
94-
9599
UserFrosting's default `docker-compose.yml` file contains a service entry for [Mailpit](https://github.com/axllent/mailpit). Mailpit intercepts emails sent by your application during local development and provides a convenient web interface so that you can preview your email messages in your browser.
96100

97101
While UserFrosting is running, you may access the Mailpit web interface at: [http://localhost:8025](http://localhost:8025).
@@ -108,19 +112,19 @@ docker-compose exec app php bakery ...
108112

109113
## Working with the Containers
110114

111-
If you need to stop the UserFrosting docker containers, just change to your userfrosting directory and run:
115+
If you need to stop the UserFrosting Docker containers, change to your UserFrosting directory and run:
112116

113117
```bash
114118
docker-compose stop
115119
```
116120

117-
To start containers again, change to your userfrosting directory and run:
121+
To start the containers again, change to your UserFrosting directory and run:
118122

119123
```bash
120124
docker-compose up -d
121125
```
122126

123-
If you need to purge your docker containers (this will not delete any source file or sprinkle, but will empty the database), run:
127+
If you need to purge your Docker containers (this will not delete any source files or sprinkles, but will empty the database), run:
124128

125129
```bash
126130
docker-compose down --remove-orphans
@@ -130,30 +134,30 @@ And then start the installation process again.
130134

131135
## Advanced configuration
132136

133-
At the heart of everything is the `docker-compose.yml` file. If you're experienced with Docker and Docker Compose, this is where you can customize your Docker experience. For example, you can customize the port each service runs on. And since the file is located in *your Sprinkle*, aka your app, it's possible to save this file in your repo.
137+
At the heart of everything is the `docker-compose.yml` file. If you're experienced with Docker and Docker Compose, this is where you can customize your Docker experience. For example, you can customize the port each service runs on. Since the file is located in *your sprinkle* (your app), it's possible to save this file in your repository.
134138

135139
The `docker-compose.yml` file also contains the MySQL database and Mail environment variables. Since these variables are defined globally inside the container, they don't need to be redefined inside the `.env` file.
136140

137141
> [!WARNING]
138-
> If you have **two** instances of UserFrosting on your computer, **they will share the same config**. This means a couple of things:
139-
> 1. You can't run both Docker instances of UserFrosting *at the same time* with the default config, as ports will overlap.
142+
> If you have **multiple** instances of UserFrosting on your computer, **they will share the same configuration by default**. This means:
143+
> 1. You can't run multiple Docker instances of UserFrosting *simultaneously* with the default configuration, as ports will conflict.
140144
> 2. Both instances will share the same database.
141-
> If you wish to run multiple instances of UserFrosting on the same computer with Docker, you must edit the `docker-compose.yml` of all but one instance and change the default ports and database volumes/database names.
145+
>
146+
> If you wish to run multiple instances of UserFrosting on the same computer with Docker, you must edit the `docker-compose.yml` for each instance and change the ports and database volumes/database names.
142147
143148
> [!NOTE]
144149
> An "*address already in use*" error can be thrown if a port defined in `docker-compose.yml` is already used on your system. For example, if Mailpit is installed locally and running on the default port, you'll get an "address already in use" error when running Docker. This can be solved by changing the port in `docker-compose.yml`.
145150
146-
## Production environment
151+
## Production Environment
147152

148-
**This is not (yet) meant for production!**
153+
**This setup is not (yet) meant for production!**
149154

150-
You may be tempted to run with this in production, but this setup has not been security-hardened. For example:
155+
You may be tempted to use this configuration in production, but it has not been security-hardened. For example:
151156

152-
- The database is exposed on port 8593 so you can access MySQL using your favorite client at localhost:8593. However,
153-
the way Docker exposes ports bypasses common firewalls like `ufw`. This should not be exposed in production.
154-
- Database credentials are hard-coded — obviously not secure.
155-
- File permissions may be more open than necessary.
157+
- The database is exposed on port 8593 so you can access MySQL using your favorite client at `localhost:8593`. However, the way Docker exposes ports bypasses common firewalls like `ufw`. This should not be exposed in production.
158+
- Database credentials are hard-coded, which is not secure.
159+
- File permissions may be more permissive than necessary.
156160
- HTTPS is not implemented.
157-
- It just hasn't been thoroughly tested in the capacity of being a production system.
161+
- This setup has not been thoroughly tested as a production system.
158162

159163
If you're experienced with Docker in a production environment, don't hesitate to reach out and contribute to this documentation.
809 KB
Loading

0 commit comments

Comments
 (0)