"."
This commit is contained in:
parent
e5e29d9b5b
commit
9e47ac8674
1 changed files with 73 additions and 0 deletions
73
how_to_install_gitea.md
Normal file
73
how_to_install_gitea.md
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
# Gitea
|
||||||
|
|
||||||
|
|
||||||
|
I'm following the instructions here: https://docs.gitea.io/en-us/install-with-docker/
|
||||||
|
|
||||||
|
Make a `gitea` folder in home.
|
||||||
|
The `docker-compose.yaml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
gitea:
|
||||||
|
external: false
|
||||||
|
|
||||||
|
services:
|
||||||
|
server:
|
||||||
|
image: gitea/gitea:1.17.1
|
||||||
|
container_name: gitea
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- USER_UID=${UID}
|
||||||
|
- USER_GID=${GID}
|
||||||
|
- GITEA__database__DB_TYPE=postgres
|
||||||
|
- GITEA__database__HOST=db:5432
|
||||||
|
- GITEA__database__NAME=gitea
|
||||||
|
- GITEA__database__USER=gitea
|
||||||
|
- GITEA__database__PASSWD=notmysqlhehe
|
||||||
|
networks:
|
||||||
|
- gitea
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
- "2222:22"
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres:14
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=gitea
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSPHRASE}
|
||||||
|
- POSTGRES_DB=gitea
|
||||||
|
networks:
|
||||||
|
- gitea
|
||||||
|
volumes:
|
||||||
|
- ./postgres:/var/lib/postgresql/data
|
||||||
|
```
|
||||||
|
|
||||||
|
This needs to go along a `.env` file in the same folder as the `docker-compose.yaml`.
|
||||||
|
|
||||||
|
```dotenv
|
||||||
|
POSTGRES_PASSPHRASE=notmysqlhehe
|
||||||
|
UID=1001
|
||||||
|
GID=1001
|
||||||
|
```
|
||||||
|
|
||||||
|
## Modifying configuration
|
||||||
|
|
||||||
|
After the first user has been created (acts as the admin user), I don't want anyone
|
||||||
|
else being able to sign-up. To achieve this, the configuration file (`~/gitea/data/gitea/conf/app.ini`)
|
||||||
|
must be modified.
|
||||||
|
|
||||||
|
`DISABLE_REGISTRATION = true`
|
||||||
|
|
||||||
|
Also, to prevent any guest from seeing what they shouldn't:
|
||||||
|
|
||||||
|
`REQUIRE_SIGNIN_VIEW = true`
|
||||||
Loading…
Add table
Add a link
Reference in a new issue