65 lines
1.3 KiB
Markdown
65 lines
1.3 KiB
Markdown
# Gitea Server
|
|
|
|
- ChatGPT conversation: https://chatgpt.com/share/672ece16-da60-8009-83de-9b33c08aed6a
|
|
- follow the basic ubuntu setup first
|
|
|
|
### Install docker
|
|
|
|
https://docs.docker.com/engine/install/ubuntu/
|
|
|
|
|
|
|
|
### Docker compose
|
|
|
|
```
|
|
version: "3"
|
|
|
|
networks:
|
|
gitea:
|
|
external: false
|
|
|
|
services:
|
|
server:
|
|
image: gitea/gitea:latest
|
|
container_name: gitea
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- GITEA__service__DISABLE_REGISTRATION=true
|
|
- GITEA__service__ENABLE_OPENID_SIGNIN=false
|
|
- GITEA__service__ENABLE_OPENID_SIGNUP=false
|
|
restart: always
|
|
networks:
|
|
- gitea
|
|
volumes:
|
|
- ./gitea:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "3000:3000" # Gitea web interface
|
|
- "2222:22" # Gitea SSH
|
|
```
|
|
|
|
### Run docker compose
|
|
|
|
`docker-compose up -d`
|
|
|
|
`docker exec -it gitea /bin/bash`
|
|
`gitea admin user create --username admin --password YourPassword --email admin@example.com --admin`
|
|
|
|
|
|
### SQLITE DB
|
|
to get into the database
|
|
|
|
sqlite3 /data/gitea/gitea.db
|
|
|
|
for users, go to the user table
|
|
|
|
#### Delete a user
|
|
|
|
```
|
|
DELETE FROM user WHERE email = 'donovan.a.kelly@pm.me';
|
|
DELETE FROM email_address WHERE email = 'donovan.a.kelly@pm.me';
|
|
DELETE FROM external_login_user WHERE email = 'donovan.a.kelly@pm.me';
|
|
|
|
``` |