mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-01 00:24:38 +00:00
use fqin for container images (#125)
It's generally considered a better practice and it's more portable allowing podman to work without having to modify the name. Reviewed-on: https://gitea.com/gitea/docs/pulls/125 Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ the official [install instructions](https://docs.docker.com/compose/install/).
|
||||
|
||||
## Basics
|
||||
|
||||
The most simple setup just creates a volume and a network and starts the `gitea/gitea:latest-rootless`
|
||||
The most simple setup just creates a volume and a network and starts the `docker.io/gitea/gitea:latest-rootless`
|
||||
image as a service. Since there is no database available, one can be initialized using SQLite3.
|
||||
|
||||
Create a directory for `data` and `config`:
|
||||
@@ -38,7 +38,7 @@ version: "2"
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@-rootless
|
||||
image: docker.io/gitea/gitea:@dockerVersion@-rootless
|
||||
restart: always
|
||||
volumes:
|
||||
- ./data:/var/lib/gitea
|
||||
@@ -71,7 +71,7 @@ version: "2"
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@-rootless
|
||||
image: docker.io/gitea/gitea:@dockerVersion@-rootless
|
||||
restart: always
|
||||
volumes:
|
||||
- ./data:/var/lib/gitea
|
||||
@@ -95,7 +95,7 @@ version: "2"
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@-rootless
|
||||
image: docker.io/gitea/gitea:@dockerVersion@-rootless
|
||||
+ environment:
|
||||
+ - GITEA__database__DB_TYPE=mysql
|
||||
+ - GITEA__database__HOST=db:3306
|
||||
@@ -115,7 +115,7 @@ services:
|
||||
+ - db
|
||||
+
|
||||
+ db:
|
||||
+ image: mysql:8
|
||||
+ image: docker.io/library/mysql:8
|
||||
+ restart: always
|
||||
+ environment:
|
||||
+ - MYSQL_ROOT_PASSWORD=gitea
|
||||
@@ -136,7 +136,7 @@ version: "2"
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@-rootless
|
||||
image: docker.io/gitea/gitea:@dockerVersion@-rootless
|
||||
environment:
|
||||
+ - GITEA__database__DB_TYPE=postgres
|
||||
+ - GITEA__database__HOST=db:5432
|
||||
@@ -156,7 +156,7 @@ services:
|
||||
+ - db
|
||||
+
|
||||
+ db:
|
||||
+ image: postgres:14
|
||||
+ image: docker.io/library/postgres:14
|
||||
+ restart: always
|
||||
+ environment:
|
||||
+ - POSTGRES_USER=gitea
|
||||
@@ -184,7 +184,7 @@ version: "2"
|
||||
+
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@-rootless
|
||||
image: docker.io/gitea/gitea:@dockerVersion@-rootless
|
||||
restart: always
|
||||
volumes:
|
||||
- - ./data:/var/lib/gitea
|
||||
@@ -211,7 +211,7 @@ version: "2"
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@-rootless
|
||||
image: docker.io/gitea/gitea:@dockerVersion@-rootless
|
||||
restart: always
|
||||
+ user: 1001
|
||||
volumes:
|
||||
@@ -283,7 +283,7 @@ docker-compose up -d
|
||||
- Rename folder (inside volume) gitea to custom
|
||||
- Edit app.ini if needed
|
||||
- Set START_SSH_SERVER = true
|
||||
- Use image gitea/gitea:@dockerVersion@-rootless
|
||||
- Use image docker.io/gitea/gitea:@dockerVersion@-rootless
|
||||
|
||||
## Managing Deployments With Environment Variables
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ the official [install instructions](https://docs.docker.com/compose/install/).
|
||||
|
||||
## Basics
|
||||
|
||||
The most simple setup just creates a volume and a network and starts the `gitea/gitea:latest`
|
||||
The most simple setup just creates a volume and a network and starts the `docker.io/gitea/gitea:latest`
|
||||
image as a service. Since there is no database available, one can be initialized using SQLite3.
|
||||
Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`.
|
||||
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
|
||||
@@ -34,7 +34,7 @@ networks:
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@
|
||||
image: docker.io/gitea/gitea:@dockerVersion@
|
||||
container_name: gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
@@ -66,7 +66,7 @@ networks:
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@
|
||||
image: docker.io/gitea/gitea:@dockerVersion@
|
||||
container_name: gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
@@ -101,7 +101,7 @@ networks:
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@
|
||||
image: docker.io/gitea/gitea:@dockerVersion@
|
||||
container_name: gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
@@ -125,7 +125,7 @@ services:
|
||||
+ - db
|
||||
+
|
||||
+ db:
|
||||
+ image: mysql:8
|
||||
+ image: docker.io/library/mysql:8
|
||||
+ restart: always
|
||||
+ environment:
|
||||
+ - MYSQL_ROOT_PASSWORD=gitea
|
||||
@@ -152,7 +152,7 @@ networks:
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@
|
||||
image: docker.io/gitea/gitea:@dockerVersion@
|
||||
container_name: gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
@@ -176,7 +176,7 @@ services:
|
||||
+ - db
|
||||
+
|
||||
+ db:
|
||||
+ image: postgres:14
|
||||
+ image: docker.io/library/postgres:14
|
||||
+ restart: always
|
||||
+ environment:
|
||||
+ - POSTGRES_USER=gitea
|
||||
@@ -208,7 +208,7 @@ networks:
|
||||
+
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:@dockerVersion@
|
||||
image: docker.io/gitea/gitea:@dockerVersion@
|
||||
container_name: gitea
|
||||
restart: always
|
||||
networks:
|
||||
@@ -316,8 +316,8 @@ Gitea will generate new secrets/tokens for every new installation automatically
|
||||
The following commands will output a new `SECRET_KEY` and `INTERNAL_TOKEN` to `stdout`, which you can then place in your environment variables.
|
||||
|
||||
```bash
|
||||
docker run -it --rm gitea/gitea:1 gitea generate secret SECRET_KEY
|
||||
docker run -it --rm gitea/gitea:1 gitea generate secret INTERNAL_TOKEN
|
||||
docker run -it --rm docker.io/gitea/gitea:1 gitea generate secret SECRET_KEY
|
||||
docker run -it --rm docker.io/gitea/gitea:1 gitea generate secret INTERNAL_TOKEN
|
||||
```
|
||||
|
||||
```yaml
|
||||
|
||||
Reference in New Issue
Block a user