DRAFT: we are stuck with db access issue
apt install docker-compose
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
version: "2" 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
apply
docker-compose up -d docker ps
as root
netstat -lntup | grep docker cd /etc/nginx/conf.d/ vi gitea.conf
location / { client_max_body_size 512M; proxy_pass http://127.0.0.1:3000; proxy_set_header Connection $http_connection; proxy_set_header Upgrade $http_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }
nginx -s reload
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://www.laurivan.com/reverse-proxy-gitea-http/
https://docs.gitea.com/next/administration/reverse-proxies
https://skarnet.org/software/s6/s6-svc.html
https://github.com/just-containers/s6-overlay