mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-07 22:18:51 +00:00
Use docusaurus warning/note syntax instead markdown
This commit is contained in:
@@ -19,7 +19,9 @@ You need a database to use Gitea. Gitea supports PostgreSQL (>=10), MySQL (>=5.7
|
||||
|
||||
Database instance can be on same machine as Gitea (local database setup), or on different machine (remote database).
|
||||
|
||||
Note: All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Gitea server. The client program is used to test connection to the database from Gitea server, while Gitea itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Gitea servers.
|
||||
:::note
|
||||
All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Gitea server. The client program is used to test connection to the database from Gitea server, while Gitea itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Gitea servers.
|
||||
:::
|
||||
|
||||
## MySQL
|
||||
|
||||
|
||||
@@ -60,8 +60,10 @@ despite warnings like `This key is not certified with a trusted signature!`.
|
||||
|
||||
## Recommended server configuration
|
||||
|
||||
**NOTE:** Many of the following directories can be configured using [Environment Variables](administration/environment-variables.md) as well!
|
||||
:::note
|
||||
Many of the following directories can be configured using [Environment Variables](administration/environment-variables.md) as well!
|
||||
Of note, configuring `GITEA_WORK_DIR` will tell Gitea where to base its working directory, as well as ease installation.
|
||||
:::
|
||||
|
||||
### Prepare environment
|
||||
|
||||
@@ -95,8 +97,10 @@ chown root:git /etc/gitea
|
||||
chmod 770 /etc/gitea
|
||||
```
|
||||
|
||||
> **NOTE:** `/etc/gitea` is temporarily set with write permissions for user `git` so that the web installer can write the configuration file. After the installation is finished, it is recommended to set permissions to read-only using:
|
||||
>
|
||||
:::note
|
||||
> `/etc/gitea` is temporarily set with write permissions for user `git` so that the web installer can write the configuration file. After the installation is finished, it is recommended to set permissions to read-only using:
|
||||
:::
|
||||
|
||||
> ```sh
|
||||
> chmod 750 /etc/gitea
|
||||
> chmod 640 /etc/gitea/app.ini
|
||||
@@ -113,7 +117,9 @@ See the [command line documentation](administration/command-line.md) for informa
|
||||
|
||||
### Configure Gitea's working directory
|
||||
|
||||
**NOTE:** If you plan on running Gitea as a Linux service, you can skip this step, as the service file allows you to set `WorkingDirectory`. Otherwise, consider setting this environment variable (semi-)permanently so that Gitea consistently uses the correct working directory.
|
||||
:::note
|
||||
If you plan on running Gitea as a Linux service, you can skip this step, as the service file allows you to set `WorkingDirectory`. Otherwise, consider setting this environment variable (semi-)permanently so that Gitea consistently uses the correct working directory.
|
||||
:::
|
||||
|
||||
```sh
|
||||
export GITEA_WORK_DIR=/var/lib/gitea/
|
||||
@@ -169,7 +175,9 @@ To restart your Gitea instance, we recommend to use SIGHUP signal. If you know y
|
||||
|
||||
To gracefully stop the Gitea instance, a simple `kill $GITEA_PID` or `killall gitea` is enough.
|
||||
|
||||
**NOTE:** We don't recommend to use the SIGKILL signal (`-9`); you may be forcefully stopping some of Gitea's internal tasks, and it will not gracefully stop (tasks in queues, indexers, etc.)
|
||||
:::note
|
||||
We don't recommend to use the SIGKILL signal (`-9`); you may be forcefully stopping some of Gitea's internal tasks, and it will not gracefully stop (tasks in queues, indexers, etc.)
|
||||
:::
|
||||
|
||||
See below for troubleshooting instructions to repair broken repositories after
|
||||
an update of your Gitea version.
|
||||
|
||||
@@ -25,15 +25,19 @@ Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
|
||||
required to build the JavaScript and CSS files. The minimum supported Node.js
|
||||
version is @minNodeVersion@ and the latest LTS version is recommended.
|
||||
|
||||
**Note**: When executing make tasks that require external tools, like
|
||||
:::note
|
||||
When executing make tasks that require external tools, like
|
||||
`make misspell-check`, Gitea will automatically download and build these as
|
||||
necessary. To be able to use these, you must have the `"$GOPATH/bin"` directory
|
||||
on the executable path. If you don't add the go bin directory to the
|
||||
executable path, you will have to manage this yourself.
|
||||
:::
|
||||
|
||||
**Note 2**: Go version @minGoVersion@ or higher is required. However, it is recommended to
|
||||
:::note
|
||||
Go version @minGoVersion@ or higher is required. However, it is recommended to
|
||||
obtain the same version as our continuous integration, see the advice given in
|
||||
[Hacking on Gitea](development/hacking-on-gitea.md)
|
||||
:::
|
||||
|
||||
## Download
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Gitea comes with a health check endpoint `/api/healthz`, you can configure it in
|
||||
|
||||
a successful health check response will respond with http code `200`, here's example:
|
||||
|
||||
```
|
||||
```json
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
{
|
||||
|
||||
@@ -240,8 +240,10 @@ started properly. Logs can be viewed with `docker-compose logs`.
|
||||
To shut down the setup, execute `docker-compose down`. This will stop
|
||||
and kill the containers. The volumes will still exist.
|
||||
|
||||
Notice: if using a non-3000 port on http, change app.ini to match
|
||||
:::note
|
||||
If using a non-3000 port on http, change app.ini to match
|
||||
`LOCAL_ROOT_URL = http://localhost:3000/`.
|
||||
:::
|
||||
|
||||
## Install
|
||||
|
||||
@@ -250,7 +252,7 @@ favorite browser to finalize the installation. Visit http://server-ip:3000 and f
|
||||
installation wizard. If the database was started with the `docker-compose` setup as
|
||||
documented above, please note that `db` must be used as the database hostname.
|
||||
|
||||
# Customization
|
||||
## Customization
|
||||
|
||||
Customization files described [here](https://docs.gitea.io/en-us/customizing-gitea/) should
|
||||
be placed in `/var/lib/gitea/custom` directory. If using host volumes, it's quite easy to access these
|
||||
@@ -258,13 +260,15 @@ files; for named volumes, this is done through another container or by direct ac
|
||||
`/var/lib/docker/volumes/gitea_gitea/_/var_lib_gitea`. The configuration file will be saved at
|
||||
`/etc/gitea/app.ini` after the installation.
|
||||
|
||||
# Upgrading
|
||||
## Upgrading
|
||||
|
||||
:::warning
|
||||
:exclamation::exclamation: **Make sure you have volumed data to somewhere outside Docker container** :exclamation::exclamation:
|
||||
:::
|
||||
|
||||
To upgrade your installation to the latest release:
|
||||
|
||||
```
|
||||
```bash
|
||||
# Edit `docker-compose.yml` to update the version, if you have one specified
|
||||
# Pull new images
|
||||
docker-compose pull
|
||||
@@ -272,7 +276,7 @@ docker-compose pull
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
# Upgrading from standard image
|
||||
## Upgrading from standard image
|
||||
|
||||
- Backup your setup
|
||||
- Change volume mountpoint from /data to /var/lib/gitea
|
||||
|
||||
@@ -241,8 +241,10 @@ started properly. Logs can be viewed with `docker-compose logs`.
|
||||
To shut down the setup, execute `docker-compose down`. This will stop
|
||||
and kill the containers. The volumes will still exist.
|
||||
|
||||
Notice: if using a non-3000 port on http, change app.ini to match
|
||||
:::note
|
||||
If using a non-3000 port on http, change app.ini to match
|
||||
`LOCAL_ROOT_URL = http://localhost:3000/`.
|
||||
:::
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -267,7 +269,9 @@ files; for named volumes, this is done through another container or by direct ac
|
||||
|
||||
## Upgrading
|
||||
|
||||
:::warning
|
||||
:exclamation::exclamation: **Make sure you have volumed data to somewhere outside Docker container** :exclamation::exclamation:
|
||||
:::
|
||||
|
||||
To upgrade your installation to the latest release:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user