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: deployment.md
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# FastAPI Project - Deployment
1
+
# Deployment
2
2
3
3
You can deploy the project using Docker Compose to a remote server.
4
4
@@ -12,7 +12,7 @@ But you have to configure a couple things first. 🤓
12
12
13
13
* Have a remote server ready and available.
14
14
* Configure the DNS records of your domain to point to the IP of the server you just created.
15
-
* Configure a wildcard subdomain for your domain, so that you can have multiple subdomains for different services, e.g. `*.fastapi-project.example.com`. This will be useful for accessing different components, like `traefik.fastapi-project.example.com`, `adminer.fastapi-project.example.com`, etc. And also for `staging`, like `staging.fastapi-project.example.com`, `staging.adminer.fastapi-project.example.com`, etc.
15
+
* Configure a wildcard subdomain for your domain, so that you can have multiple subdomains for different services, e.g. `*.project.example.com`. This will be useful for accessing different components, like `traefik.project.example.com`, `adminer.project.example.com`, etc. And also for `staging`, like `staging.project.example.com`, `staging.adminer.project.example.com`, etc.
16
16
* Install and configure [Docker](https://docs.docker.com/engine/install/) on the remote server (Docker Engine, not Docker Desktop).
17
17
18
18
## Public Traefik
@@ -78,7 +78,7 @@ echo $HASHED_PASSWORD
78
78
* Create an environment variable with the domain name for your server, e.g.:
79
79
80
80
```bash
81
-
export DOMAIN=fastapi-project.example.com
81
+
export DOMAIN=project.example.com
82
82
```
83
83
84
84
* Create an environment variable with the email for Let's Encrypt, e.g.:
@@ -103,9 +103,9 @@ Now with the environment variables set and the `docker-compose.traefik.yml` in p
103
103
docker compose -f docker-compose.traefik.yml up -d
104
104
```
105
105
106
-
## Deploy the FastAPI Project
106
+
## Deploy the Project
107
107
108
-
Now that you have Traefik in place you can deploy your FastAPI project with Docker Compose.
108
+
Now that you have Traefik in place you can deploy your project with Docker Compose.
109
109
110
110
**Note**: You might want to jump ahead to the section about Continuous Deployment with GitHub Actions.
Set the `DOMAIN`, by default `localhost` (for development), but when deploying you would use your own domain, for example:
123
123
124
124
```bash
125
-
export DOMAIN=fastapi-project.example.com
125
+
export DOMAIN=project.example.com
126
126
```
127
127
128
128
You can set several variables, like:
129
129
130
130
*`PROJECT_NAME`: The name of the project, used in the API for the docs and emails.
131
-
*`STACK_NAME`: The name of the stack used for Docker Compose labels and project name, this should be different for `staging`, `production`, etc. You could use the same domain replacing dots with dashes, e.g. `fastapi-project-example-com` and `staging-fastapi-project-example-com`.
131
+
*`STACK_NAME`: The name of the stack used for Docker Compose labels and project name, this should be different for `staging`, `production`, etc. You could use the same domain replacing dots with dashes, e.g. `project-example-com` and `staging-project-example-com`.
132
132
*`BACKEND_CORS_ORIGINS`: A list of allowed CORS origins separated by commas.
133
-
*`SECRET_KEY`: The secret key for the FastAPI project, used to sign tokens.
133
+
*`SECRET_KEY`: The secret key for the project, used to sign tokens.
134
134
*`FIRST_SUPERUSER`: The email of the first superuser, this superuser will be the one that can create new users.
135
135
*`FIRST_SUPERUSER_PASSWORD`: The password of the first superuser.
136
136
*`SMTP_HOST`: The SMTP server host to send emails, this would come from your email provider (E.g. Mailgun, Sparkpost, Sendgrid, etc).
@@ -276,28 +276,28 @@ If you need to add extra environments you could use those as a starting point.
276
276
277
277
## URLs
278
278
279
-
Replace `fastapi-project.example.com` with your domain.
Copy file name to clipboardExpand all lines: frontend/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# FastAPI Project - Frontend
1
+
# Frontend
2
2
3
3
The frontend is built with [Vite](https://vitejs.dev/), [React](https://reactjs.org/), [TypeScript](https://www.typescriptlang.org/), [TanStack Query](https://tanstack.com/query), [TanStack Router](https://tanstack.com/router) and [Chakra UI](https://chakra-ui.com/).
0 commit comments