diff --git a/CHANGELOG b/CHANGELOG index 8f7e3a3..dbe91a6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,96 +1,3 @@ -[0.6.10] -* Works with readonly rootfs - -[0.6.11] -* Fix bug where app wouldn't start up - -[0.7.0] -* Update to latest base image - -[0.7.1] -* Remove some backward compat code - -[0.8.0] -* Use Gogs 0.8.25 -* Support GitHub style Markdown checklist -* Add more APIs: user followers -* Support side-by-side diff view -* Support highlight inline diff -* Complete [Changelog](https://github.com/gogits/gogs/releases/tag/v0.8.25) - -[0.9.0] -* Use 'git' instead of 'cloudron' user - -[0.10.0] -* Use Gogs 0.8.43 -* Issue references have bad links behind a reverse proxy sub-path #2229 - -[0.11.0] -* Use Gogs 0.9.0 -* [Changelog](https://github.com/gogits/gogs/releases/tag/v0.9.0) - -[0.12.0] -* Use Gogs 0.9.13 - -[0.12.1] -* Fix username login - -[0.12.2] -* Allow disabling SSH - -[0.12.3] -* Fix login via email - -[0.12.4] -* Fix ldap update query - -[0.12.5] -* Preserve ssh host keys across updates - -[0.12.6] -* Use latest SMTP configuration - -[0.12.7] -* Update base image to 0.8.1 - -[0.13.0] -* Update Gogs to 0.9.48 -* [Changelog](https://github.com/gogits/gogs/releases/tag/v0.9.48) - -[0.13.1] -* Update Gogs to 0.9.71 -* [Changelog](https://github.com/gogits/gogs/releases/tag/v0.9.71) - -[0.13.2] -* Update base image - -[0.13.3] -* Implement public mode - -[0.13.4] -* Add post install message - -[0.13.5] -* Fix post install message - -[0.14.0] -* Update base image -* Update Gogs to 0.9.128 - -[0.14.1] -* Update description - -[0.15.0] -* Update to 0.10.18 - -[0.16.0] -* Update Gogs to 0.11 -* Fix issue where custom avatars could not be uploaded -* Fix issue where web based editing would not work - -[0.16.1] -* Update Gogs to 0.11.4 - -[0.16.2] -* Update description +[0.1.0] +* Initial package (forked from Gogs app) diff --git a/CloudronManifest.json b/CloudronManifest.json index e3c9f95..639d5aa 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -1,10 +1,10 @@ { - "id": "io.gogs.cloudronapp", - "title": "Gogs", - "author": "Gogs developers", + "id": "io.gitea.cloudronapp", + "title": "Gitea", + "author": "Gitea developers", "description": "file://DESCRIPTION.md", "tagline": "A painless self-hosted Git Service", - "version": "0.16.2", + "version": "0.1.0", "healthCheckPath": "/healthcheck", "httpPort": 3000, "addons": { @@ -21,14 +21,19 @@ } }, "manifestVersion": 1, - "website": "https://gogs.io", + "website": "https://gitea.io", "contactEmail": "apps@cloudron.io", "icon": "file://logo.png", "mediaLinks": [ - "https://gogs.io/img/screenshots/1.png", - "https://gogs.io/img/screenshots/2.png", - "https://gogs.io/img/screenshots/4.png", - "https://gogs.io/img/screenshots/5.png" + "https://i.imgur.com/3iEQsux.jpg", + "https://i.imgur.com/glqFnj8.jpg", + "https://i.imgur.com/ad1FEpi.jpg", + "https://i.imgur.com/q81EcGa.jpg", + "https://i.imgur.com/L2CQeN0.jpg", + "https://i.imgur.com/cNuvMum.jpg", + "https://i.imgur.com/xCYRqaF.jpg", + "https://i.imgur.com/ILpRBCe.jpg", + "https://i.imgur.com/0BHnrcL.jpg" ], "tags": [ "version control", "git", "code hosting", "development" ], "changelog": "file://CHANGELOG", diff --git a/DESCRIPTION.md b/DESCRIPTION.md index 8d4d5d7..f88b23a 100644 --- a/DESCRIPTION.md +++ b/DESCRIPTION.md @@ -1,6 +1,6 @@ -Gogs (Go Git Service) is a painless self-hosted Git service. +Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab. The initial development have been done on Gogs but we have forked it and named it Gitea. If you want to read more about the reasons why we have done that please read this blog post. -This app packages Gogs 0.11.4 +This app packages Gogs 1.1.1 ### Purpose @@ -25,4 +25,4 @@ The goal of this project is to make the easiest, fastest, and most painless way ### Bug reports -Open bugs on [Github](https://git.cloudron.io/cloudron/gogs-app/issues) +Open bugs on [Github](https://git.cloudron.io/dswd/gitea-app/issues) diff --git a/Dockerfile b/Dockerfile index 33927e1..1f12a92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM cloudron/base:0.10.0 +ENV VERSION 1.1.1 + RUN apt-get update && \ apt-get install -y openssh-server && \ rm -rf /etc/ssh_host_* && \ @@ -7,22 +9,22 @@ RUN apt-get update && \ ADD supervisor/ /etc/supervisor/conf.d/ -RUN adduser --disabled-login --gecos 'Gogs' git +RUN adduser --disabled-login --gecos 'Gitea' git # by default, git account is created as inactive which prevents login via openssh # https://github.com/gitlabhq/gitlabhq/issues/5304 RUN passwd -d git -RUN mkdir -p /home/git/gogs +RUN mkdir -p /home/git/gitea ## TODO: use redis as well -RUN cd /home/git/gogs && \ - curl -L https://github.com/gogits/gogs/releases/download/v0.11.4/linux_amd64.tar.gz | tar zxvf - --strip-components 1 +RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \ + && chmod +x /home/git/gitea/gitea # setup config paths ADD app.ini.template /home/git/app.ini.template # setup log paths -RUN mkdir -p /run/gogs && chown -R git:git /run/gogs -RUN sed -e 's,^logfile=.*$,logfile=/run/gogs/supervisord.log,' -i /etc/supervisor/supervisord.conf +RUN mkdir -p /run/gitea && chown -R git:git /run/gitea +RUN sed -e 's,^logfile=.*$,logfile=/run/gitea/supervisord.log,' -i /etc/supervisor/supervisord.conf RUN ln -s /app/data/ssh /home/git/.ssh RUN ln -s /app/data/gitconfig /home/git/.gitconfig diff --git a/POSTINSTALL.md b/POSTINSTALL.md index 28e31c0..5f5ec58 100644 --- a/POSTINSTALL.md +++ b/POSTINSTALL.md @@ -1,5 +1,5 @@ This app integrates with the Cloudron SSO. Admins on Cloudron automatically -become admins on Gogs. +become admins on Gitea. If you want to disable Cloudron SSO, do the following: @@ -7,6 +7,6 @@ If you want to disable Cloudron SSO, do the following: * Admin Panel -> Users -> Change Authentication Source to 'Local' and also give a password You can create a `/app/data/app.ini` with any custom configuration. See the -[configuration cheat sheet](https://gogs.io/docs/advanced/configuration_cheat_sheet) +[configuration cheat sheet](https://docs.gitea.io/en-us/config-cheat-sheet) for more information. diff --git a/README.md b/README.md index e05d6c5..f7a2394 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Gogs Cloudron App +# Gitea Cloudron App -This repository contains the Cloudron app package source for [Gogs](http://gogs.io/). +This repository contains the Cloudron app package source for [Gitea](http://gitea.io/). ## Installation -[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=io.gogs.cloudronapp) +[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=io.gitea.cloudronapp) or using the [Cloudron command line tooling](https://cloudron.io/references/cli.html) ``` -cloudron install --appstore-id io.gogs.cloudronapp +cloudron install --appstore-id io.gitea.cloudronapp ``` ## Building @@ -17,7 +17,7 @@ cloudron install --appstore-id io.gogs.cloudronapp The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html). ``` -cd gogs-app +cd gitea-app cloudron build cloudron install @@ -28,7 +28,7 @@ cloudron install The e2e tests are located in the `test/` folder and require [nodejs](http://nodejs.org/). They are creating a fresh build, install the app on your Cloudron, perform tests, backup, restore and test if the repos are still ok. The tests expect port 29418 to be available. ``` -cd gogs-app/test +cd gitea-app/test npm install USERNAME= PASSWORD= mocha --bail test.js diff --git a/app.ini.template b/app.ini.template index 156a581..080c13d 100644 --- a/app.ini.template +++ b/app.ini.template @@ -1,4 +1,4 @@ -APP_NAME = Gogs: Go Git Service +APP_NAME = Gitea RUN_USER = git RUN_MODE = prod @@ -29,7 +29,7 @@ SCRIPT_TYPE = bash [repository.upload] ENABLED = true -TEMP_PATH = /run/gogs/tmp/uploads +TEMP_PATH = /run/gitea/tmp/uploads [release.attachment] ENABLED = true @@ -57,7 +57,7 @@ ENABLE_NOTIFY_MAIL = true ; Either "console", "file", "conn", "smtp" or "database", default is "console" MODE = console ; used for xorm.log -ROOT_PATH = /run/gogs +ROOT_PATH = /run/gitea [picture] ; APP_DATA_PATH/avatars @@ -70,3 +70,5 @@ ENABLE = true ; APP_DATA_PATH/attachments PATH = +[indexer] +ISSUE_INDEXER_PATH = /app/data/appdata/indexers/issues.bleve diff --git a/logo.png b/logo.png index 3438553..eeda8fb 100644 Binary files a/logo.png and b/logo.png differ diff --git a/start.sh b/start.sh index 34b0695..1e7f314 100755 --- a/start.sh +++ b/start.sh @@ -2,14 +2,14 @@ set -eu -o pipefail -mkdir -p /run/gogs/tmp/uploads +mkdir -p /run/gitea/tmp/uploads setup_ldap_source() { set -eu - # Wait for gogs to finish db setup, before we insert ldap source in db + # Wait for gitea to finish db setup, before we insert ldap source in db while ! curl --fail http://localhost:3000/healthcheck; do - echo "Waiting for gogs to come up" + echo "Waiting for gitea to come up" sleep 1 done @@ -53,7 +53,7 @@ chmod 0644 /app/data/sshd/*.pub sed -e "s/^Port .*/Port ${SSH_PORT}/" \ -e "s/^#ListenAddress .*/ListenAddress 0.0.0.0/" \ -e "s,^HostKey /etc/ssh/,HostKey /app/data/sshd/," \ - /etc/ssh/sshd_config > /run/gogs/sshd_config + /etc/ssh/sshd_config > /run/gitea/sshd_config sed -e "s/##DOMAIN/${APP_DOMAIN}/g" \ -e "s/##SSH_PORT/${SSH_PORT}/g" \ @@ -69,16 +69,16 @@ sed -e "s/##DOMAIN/${APP_DOMAIN}/g" \ -e "s/##MAIL_SMTP_USERNAME/${MAIL_SMTP_USERNAME}/g" \ -e "s/##MAIL_SMTP_PASSWORD/${MAIL_SMTP_PASSWORD}/g" \ -e "s/##SECRET_KEY/$(pwgen -1 -s)/g" \ - /home/git/app.ini.template > "/run/gogs/app.ini" + /home/git/app.ini.template > "/run/gitea/app.ini" # merge any user config file -[[ -f /app/data/app.ini ]] && cat "/app/data/app.ini" >> "/run/gogs/app.ini" +[[ -f /app/data/app.ini ]] && cat "/app/data/app.ini" >> "/run/gitea/app.ini" mkdir -p /app/data/repository /app/data/ssh -chown -R git:git /app/data /run/gogs +chown -R git:git /app/data /run/gitea ( setup_ldap_source ) & -exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gogs +exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gitea diff --git a/supervisor/gogs.conf b/supervisor/gitea.conf similarity index 71% rename from supervisor/gogs.conf rename to supervisor/gitea.conf index 1c703ce..d85a788 100644 --- a/supervisor/gogs.conf +++ b/supervisor/gitea.conf @@ -1,6 +1,6 @@ -[program:gogs] -directory=/home/git/gogs -command=/home/git/gogs/gogs web -c /run/gogs/app.ini -p 3000 +[program:gitea] +directory=/home/git/gitea +command=/home/git/gitea/gitea web -c /run/gitea/app.ini -p 3000 user=git autostart=true autorestart=true diff --git a/supervisor/sshd.conf b/supervisor/sshd.conf index 4a80c8d..52f7f4f 100644 --- a/supervisor/sshd.conf +++ b/supervisor/sshd.conf @@ -1,6 +1,6 @@ [program:sshd] directory=/ -command=/usr/sbin/sshd -f /run/gogs/sshd_config -D +command=/usr/sbin/sshd -f /run/gitea/sshd_config -D user=root autostart=true autorestart=true