mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-22 02:37:42 +00:00
Update docs/installation/with-docker.md (#352)
Removed version, and changed the command from `docker-compose` to `docker compose` and changed the tool `docker-compose` to the docker `compose`-plugin Reviewed-on: https://gitea.com/gitea/docs/pulls/352 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: silverwind <silverwind@noreply.gitea.com> Co-authored-by: iqre8 <iqre8@noreply.gitea.com> Co-committed-by: iqre8 <iqre8@noreply.gitea.com>
This commit is contained in:
@@ -12,8 +12,8 @@ Gitea provides automatically updated Docker images within its Docker Hub organiz
|
|||||||
possible to always use the latest stable tag or to use another service that handles updating
|
possible to always use the latest stable tag or to use another service that handles updating
|
||||||
Docker images.
|
Docker images.
|
||||||
|
|
||||||
This reference setup guides users through the setup based on `docker-compose`, but the installation
|
This reference setup guides users through the setup based on docker `compose`-plugin, but the installation
|
||||||
of `docker-compose` is out of scope of this documentation. To install `docker-compose` itself, follow
|
of the docker `compose`-plugin is out of scope of this documentation. To install the docker `compose`-plugin itself, follow
|
||||||
the official [install instructions](https://docs.docker.com/compose/install/).
|
the official [install instructions](https://docs.docker.com/compose/install/).
|
||||||
|
|
||||||
## Basics
|
## Basics
|
||||||
@@ -26,8 +26,6 @@ If you don't give the volume correct permissions, the container may not start.
|
|||||||
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@dockerVersion@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
|
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@dockerVersion@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: "3"
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
external: false
|
external: false
|
||||||
@@ -58,8 +56,6 @@ the port section. It's common to just change the host port and keep the ports wi
|
|||||||
the container like they are.
|
the container like they are.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
version: "3"
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
external: false
|
external: false
|
||||||
@@ -93,8 +89,6 @@ To start Gitea in combination with a MySQL database, apply these changes to the
|
|||||||
`docker-compose.yml` file created above.
|
`docker-compose.yml` file created above.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
version: "3"
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
external: false
|
external: false
|
||||||
@@ -144,8 +138,6 @@ To start Gitea in combination with a PostgreSQL database, apply these changes to
|
|||||||
the `docker-compose.yml` file created above.
|
the `docker-compose.yml` file created above.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
version: "3"
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
external: false
|
external: false
|
||||||
@@ -196,8 +188,6 @@ create the required volume. You don't need to worry about permissions with
|
|||||||
named volumes; Docker will deal with that automatically.
|
named volumes; Docker will deal with that automatically.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
version: "3"
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
external: false
|
external: false
|
||||||
@@ -233,11 +223,11 @@ From July 2023 Compose V1 stopped receiving updates. It's also no longer availab
|
|||||||
Compose V2 is included with all currently supported versions of Docker Desktop. Please use V2 to do below operations.
|
Compose V2 is included with all currently supported versions of Docker Desktop. Please use V2 to do below operations.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
To start this setup based on `docker-compose`, execute `docker-compose up -d`,
|
To start this setup based on the docker `compose`-plugin, execute `docker compose up -d`,
|
||||||
to launch Gitea in the background. Using `docker-compose ps` will show if Gitea
|
to launch Gitea in the background. Using `docker compose ps` will show if Gitea
|
||||||
started properly. Logs can be viewed with `docker-compose logs`.
|
started properly. Logs can be viewed with `docker compose logs`.
|
||||||
|
|
||||||
To shut down the setup, execute `docker-compose down`. This will stop
|
To shut down the setup, execute `docker compose down`. This will stop
|
||||||
and kill the containers. The volumes will still exist.
|
and kill the containers. The volumes will still exist.
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
@@ -247,9 +237,9 @@ If using a non-3000 port on http, change app.ini to match
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
After starting the Docker setup via `docker-compose`, Gitea should be available using a
|
After starting the Docker setup via the docker `compose`-plugin, Gitea should be available using a
|
||||||
favorite browser to finalize the installation. Visit http://server-ip:3000 and follow the
|
favorite browser to finalize the installation. Visit http://server-ip:3000 and follow the
|
||||||
installation wizard. If the database was started with the `docker-compose` setup as
|
installation wizard. If the database was started with the docker `compose`-plugin setup as
|
||||||
documented above, please note that `db` must be used as the database hostname.
|
documented above, please note that `db` must be used as the database hostname.
|
||||||
|
|
||||||
## Configure the user inside Gitea using environment variables
|
## Configure the user inside Gitea using environment variables
|
||||||
@@ -279,9 +269,9 @@ To upgrade your installation to the latest release:
|
|||||||
```bash
|
```bash
|
||||||
# Edit `docker-compose.yml` to update the version, if you have one specified
|
# Edit `docker-compose.yml` to update the version, if you have one specified
|
||||||
# Pull new images
|
# Pull new images
|
||||||
docker-compose pull
|
docker compose pull
|
||||||
# Start a new container, automatically removes old one
|
# Start a new container, automatically removes old one
|
||||||
docker-compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
## Managing Deployments With Environment Variables
|
## Managing Deployments With Environment Variables
|
||||||
|
|||||||
Reference in New Issue
Block a user