diff options
author | Patrick Schratz <patrick.schratz@gmail.com> | 2020-12-09 07:47:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 07:47:06 +0100 |
commit | af79677a44aec3924823d90f42e5cc2e6e1b2961 (patch) | |
tree | ed84af9ce17ff0f1337984b99f60d20541adf3da /docs/content/doc/installation/with-docker.en-us.md | |
parent | 97ab820accba40de66d7df7cdc5e396277483710 (diff) | |
download | gitea-af79677a44aec3924823d90f42e5cc2e6e1b2961.tar.gz gitea-af79677a44aec3924823d90f42e5cc2e6e1b2961.zip |
Reformat docs (#13897)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'docs/content/doc/installation/with-docker.en-us.md')
-rw-r--r-- | docs/content/doc/installation/with-docker.en-us.md | 68 |
1 files changed, 36 insertions, 32 deletions
diff --git a/docs/content/doc/installation/with-docker.en-us.md b/docs/content/doc/installation/with-docker.en-us.md index ac085e4efc..4118d190d9 100644 --- a/docs/content/doc/installation/with-docker.en-us.md +++ b/docs/content/doc/installation/with-docker.en-us.md @@ -3,7 +3,7 @@ date: "2020-03-19T19:27:00+02:00" title: "Installation with Docker" slug: "install-with-docker" weight: 10 -toc: true +toc: false draft: false menu: sidebar: @@ -23,6 +23,8 @@ This reference setup guides users through the setup based on `docker-compose`, b of `docker-compose` is out of scope of this documentation. To install `docker-compose` itself, follow the official [install instructions](https://docs.docker.com/compose/install/). +**Table of Contents** + {{< toc >}} ## Basics @@ -61,7 +63,7 @@ services: - "222:22" ``` -## Custom port +## Ports To bind the integrated openSSH daemon and the webserver on a different port, adjust the port section. It's common to just change the host port and keep the ports within @@ -95,7 +97,9 @@ services: + - "2221:22" ``` -## MySQL database +## Databases + +### MySQL database To start Gitea in combination with a MySQL database, apply these changes to the `docker-compose.yml` file created above. @@ -146,7 +150,7 @@ services: + - ./mysql:/var/lib/mysql ``` -## PostgreSQL database +### PostgreSQL database To start Gitea in combination with a PostgreSQL database, apply these changes to the `docker-compose.yml` file created above. @@ -233,7 +237,7 @@ services: MySQL or PostgreSQL containers will need to be created separately. -## Start +## Startup To start this setup based on `docker-compose`, execute `docker-compose up -d`, to launch Gitea in the background. Using `docker-compose ps` will show if Gitea @@ -245,42 +249,42 @@ and kill the containers. The volumes will still exist. Notice: if using a non-3000 port on http, change app.ini to match `LOCAL_ROOT_URL = http://localhost:3000/`. -## Install +## Installation After starting the Docker setup via `docker-compose`, Gitea should be available using a 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 documented above, please note that `db` must be used as the database hostname. -## Environments variables +## Environment variables You can configure some of Gitea's settings via environment variables: (Default values are provided in **bold**) -* `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title. -* `RUN_MODE`: **prod**: Application run mode, affects performance and debugging. Either "dev", "prod" or "test". -* `DOMAIN`: **localhost**: Domain name of this server, used for the displayed http clone URL in Gitea's UI. -* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed ssh clone URL in Gitea's UI. If the install page is enabled, SSH Domain Server takes DOMAIN value in the form (which overwrite this setting on save). -* `SSH_PORT`: **22**: SSH port displayed in clone URL. -* `SSH_LISTEN_PORT`: **%(SSH\_PORT)s**: Port for the built-in SSH server. -* `DISABLE_SSH`: **false**: Disable SSH feature when it's not available. If you want to disable SSH feature, you should set SSH port to `0` when installing Gitea. -* `HTTP_PORT`: **3000**: HTTP listen port. -* `ROOT_URL`: **""**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker). -* `LFS_START_SERVER`: **false**: Enables git-lfs support. -* `DB_TYPE`: **sqlite3**: The database type in use \[mysql, postgres, mssql, sqlite3\]. -* `DB_HOST`: **localhost:3306**: Database host address and port. -* `DB_NAME`: **gitea**: Database name. -* `DB_USER`: **root**: Database username. -* `DB_PASSWD`: **"\<empty>"**: Database user password. Use \`your password\` for quoting if you use special characters in the password. -* `INSTALL_LOCK`: **false**: Disallow access to the install page. -* `SECRET_KEY`: **""**: Global secret key. This should be changed. If this has a value and `INSTALL_LOCK` is empty, `INSTALL_LOCK` will automatically set to `true`. -* `DISABLE_REGISTRATION`: **false**: Disable registration, after which only admin can create accounts for users. -* `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page. -* `USER_UID`: **1000**: The UID (Unix user ID) of the user that runs Gitea within the container. Match this to the UID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes). -* `USER_GID`: **1000**: The GID (Unix group ID) of the user that runs Gitea within the container. Match this to the GID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes). - -# Customization +- `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title. +- `RUN_MODE`: **prod**: Application run mode, affects performance and debugging. Either "dev", "prod" or "test". +- `DOMAIN`: **localhost**: Domain name of this server, used for the displayed http clone URL in Gitea's UI. +- `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed ssh clone URL in Gitea's UI. If the install page is enabled, SSH Domain Server takes DOMAIN value in the form (which overwrite this setting on save). +- `SSH_PORT`: **22**: SSH port displayed in clone URL. +- `SSH_LISTEN_PORT`: **%(SSH_PORT)s**: Port for the built-in SSH server. +- `DISABLE_SSH`: **false**: Disable SSH feature when it's not available. If you want to disable SSH feature, you should set SSH port to `0` when installing Gitea. +- `HTTP_PORT`: **3000**: HTTP listen port. +- `ROOT_URL`: **""**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker). +- `LFS_START_SERVER`: **false**: Enables git-lfs support. +- `DB_TYPE`: **sqlite3**: The database type in use \[mysql, postgres, mssql, sqlite3\]. +- `DB_HOST`: **localhost:3306**: Database host address and port. +- `DB_NAME`: **gitea**: Database name. +- `DB_USER`: **root**: Database username. +- `DB_PASSWD`: **"\<empty>"**: Database user password. Use \`your password\` for quoting if you use special characters in the password. +- `INSTALL_LOCK`: **false**: Disallow access to the install page. +- `SECRET_KEY`: **""**: Global secret key. This should be changed. If this has a value and `INSTALL_LOCK` is empty, `INSTALL_LOCK` will automatically set to `true`. +- `DISABLE_REGISTRATION`: **false**: Disable registration, after which only admin can create accounts for users. +- `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page. +- `USER_UID`: **1000**: The UID (Unix user ID) of the user that runs Gitea within the container. Match this to the UID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes). +- `USER_GID`: **1000**: The GID (Unix group ID) of the user that runs Gitea within the container. Match this to the GID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes). + +## Customization Customization files described [here](https://docs.gitea.io/en-us/customizing-gitea/) should be placed in `/data/gitea` directory. If using host volumes, it's quite easy to access these @@ -288,7 +292,7 @@ files; for named volumes, this is done through another container or by direct ac `/var/lib/docker/volumes/gitea_gitea/_data`. The configuration file will be saved at `/data/gitea/conf/app.ini` after the installation. -# Upgrading +## Upgrading :exclamation::exclamation: **Make sure you have volumed data to somewhere outside Docker container** :exclamation::exclamation: @@ -302,7 +306,7 @@ docker-compose pull docker-compose up -d ``` -# SSH Container Passthrough +## SSH Container Passthrough Since SSH is running inside the container, SSH needs to be passed through from the host to the container if SSH support is desired. One option would be to run the container SSH on a non-standard port (or moving the host port to a non-standard port). Another option which might be more straightforward is to forward SSH connections from the host to the container. This setup is explained in the following. |