-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
70 lines (61 loc) · 2.45 KB
/
Copy pathcompose.yaml
File metadata and controls
70 lines (61 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: gitea
x-daemonless:
title: "Gitea"
icon: ":simple-gitea:"
category: "Infrastructure"
description: "Lightweight self-hosted Git service — a community managed fork of Gogs written in Go."
upstream_url: "https://github.com/go-gitea/gitea"
web_url: "https://about.gitea.com/"
freshports_url: "https://www.freshports.org/www/gitea/"
user: "bsd"
mlock: false
upstream_binary: true
appjail: true
docs:
env:
PUID: "User ID for the application process"
PGID: "Group ID for the application process"
TZ: "Timezone for the container"
SSH_PORT: "Published port for sshd (used in clone URLs)"
SSH_LISTEN_PORT: "Port on which sshd listens inside the container"
volumes:
/config: "Configuration, repositories, and data directory"
ports:
3000: "Web UI"
22: "SSH port"
notes: |
## First run
If no configuration file exists when the container starts, it will generate an initial default
config file at `/config/custom/conf/app.ini`.
You can make configuration changes in this file later (e.g. SMTP configuration) and they will be
preserved across container restarts.
## SSH Setup
If you modify the port mapping from the default `2222:22` you need to update the 2 environment variables
described below accordingly.
### `SSH_LISTEN_PORT` env var
This variable indicates on which port Gitea's ssh server listens inside the container.
If your port mapping for ssh is `2222:22`, this variable should be set to `22`.
This variable is used on every container start to modify the Gitea configuration.
### `SSH_PORT` env var
This variable tells Gitea on which port the ssh server is reachable from the outside and is
used when constructing the `ssh` URLs shown in Gitea's web UI.
If your port mapping for ssh is `2222:22`, this variable should be set to `2222`.
This variable is used only during the first container startup to create the initial configuration file for Gitea.
If you want to modify the `SSH_PORT` later, you need to change the configuration in the `[server]`
section of `/config/custom/conf/app.ini`.
services:
gitea:
image: ghcr.io/daemonless/gitea:latest
container_name: gitea
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=UTC
- SSH_PORT=2222
- SSH_LISTEN_PORT=22
volumes:
- /path/to/containers/gitea:/config
ports:
- "3000:3000"
- "2222:22"