ideally docker ce incl. compose
docker version docker compose version
as root
#docker rm -f gitea_server_1 gitea_db_1 #rm -rf /data/gitea/ mkdir -p /data/gitea/ chown -R USER:users /data/gitea/
as user
follow the guide but we used those
cd /data/gitea/ vi docker-compose.yaml
services:
server:
image: gitea/gitea:latest
environment:
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=db:3306
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=PASSWORD
restart: always
volumes:
- /data/gitea/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "127.0.0.1:3000:3000"
- "22222:22"
depends_on:
- db
db:
image: mysql:latest
restart: always
environment:
- MYSQL_ROOT_PASSWORD=SOME-OTHER-PASSWORD
- MYSQL_USER=gitea
- MYSQL_PASSWORD=PASSWORD
- MYSQL_DATABASE=gitea
volumes:
- /data/gitea/mysql:/var/lib/mysql
note password needs to be identical for MYSQL_PASSWORD and GITEA__database__PASSWD
– that’s just the database setting on one side and the client (gitea) setting on another.
apply
docker compose up -d docker ps
https://gitea.nethence.com/ ssh server port: 22222 + email settings / from abuse@ + third-party / hidden email domain + admin account / gitea-admin / abuse@
fix email settings
vi /data/gitea/data/conf/app.ini [mailer] ENABLED = true SMTP_ADDR = 172.17.0.1 SMTP_PORT = 25 PROTOCOL = smtp+starttls FROM = abuse@nethence.com USER = PASSWD =
interestingly enough, that gitea image runs the s6 init
PID USER TIME COMMAND
1 root 0:00 /bin/s6-svscan /etc/s6
15 root 0:00 s6-supervise gitea
16 root 0:00 s6-supervise openssh
17 root 0:00 sshd: /usr/sbin/sshd -D -e [listener] 0 of 10-100 startups
18 git 0:00 /usr/local/bin/gitea web
https://hub.docker.com/r/gitea/gitea
https://docs.gitea.com/installation/install-with-docker-rootless
https://docs.gitea.com/next/administration/email-setup
https://docs.gitea.com/next/administration/config-cheat-sheet ==> smtp+starttls
https://skarnet.org/software/s6/s6-svc.html
https://github.com/just-containers/s6-overlay