mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2025-09-26 15:07:25 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
10df3c6ba9 | ||
|
047ec295bc | ||
|
31b8a17230 | ||
|
ebb46bb7ac | ||
|
53f180ef95 | ||
|
d89fc6a0ec |
@@ -319,3 +319,10 @@
|
|||||||
* better custom app.ini integration
|
* better custom app.ini integration
|
||||||
* optional sso support
|
* optional sso support
|
||||||
|
|
||||||
|
[1.12.0]
|
||||||
|
* Update Gitea to 1.8.3
|
||||||
|
* Update manifest to v2
|
||||||
|
|
||||||
|
[1.13.0]
|
||||||
|
* Update Gitea to 1.9.0
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
"author": "Gitea developers",
|
"author": "Gitea developers",
|
||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"tagline": "A painless self-hosted Git Service",
|
"tagline": "A painless self-hosted Git Service",
|
||||||
"version": "1.11.0",
|
"version": "1.13.0",
|
||||||
"healthCheckPath": "/healthcheck",
|
"healthCheckPath": "/healthcheck",
|
||||||
"httpPort": 3000,
|
"httpPort": 3000,
|
||||||
"addons": {
|
"addons": {
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"defaultValue": 29418
|
"defaultValue": 29418
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"manifestVersion": 1,
|
"manifestVersion": 2,
|
||||||
"website": "https://gitea.io",
|
"website": "https://gitea.io",
|
||||||
"contactEmail": "apps@cloudron.io",
|
"contactEmail": "apps@cloudron.io",
|
||||||
"icon": "file://logo.png",
|
"icon": "file://logo.png",
|
||||||
@@ -35,6 +35,6 @@
|
|||||||
"tags": [ "version control", "git", "code hosting", "development" ],
|
"tags": [ "version control", "git", "code hosting", "development" ],
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG",
|
||||||
"postInstallMessage": "file://POSTINSTALL.md",
|
"postInstallMessage": "file://POSTINSTALL.md",
|
||||||
"minBoxVersion": "1.10.0",
|
"minBoxVersion": "4.1.4",
|
||||||
"documentationUrl": "https://cloudron.io/documentation/apps/gitea/"
|
"documentationUrl": "https://cloudron.io/documentation/apps/gitea/"
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
This app packages Gitea <upstream>1.8.2</upstream>
|
This app packages Gitea <upstream>1.9.0</upstream>
|
||||||
|
|
||||||
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab.
|
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab.
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ RUN passwd -d git
|
|||||||
|
|
||||||
RUN mkdir -p /home/git/gitea
|
RUN mkdir -p /home/git/gitea
|
||||||
WORKDIR /home/git
|
WORKDIR /home/git
|
||||||
RUN curl -L https://dl.gitea.io/gitea/1.8.2/gitea-1.8.2-linux-amd64 -o /home/git/gitea/gitea \
|
RUN curl -L https://dl.gitea.io/gitea/1.9.0/gitea-1.9.0-linux-amd64 -o /home/git/gitea/gitea \
|
||||||
&& chmod +x /home/git/gitea/gitea
|
&& chmod +x /home/git/gitea/gitea
|
||||||
|
|
||||||
# setup config paths
|
# setup config paths
|
||||||
|
28
start.sh
28
start.sh
@@ -9,13 +9,13 @@ setup_ldap_source() {
|
|||||||
|
|
||||||
# Get the existing LDAP source status. This allows the user to disable LDAP
|
# Get the existing LDAP source status. This allows the user to disable LDAP
|
||||||
# Note that this method is deprecated since this app now supports optionalSso
|
# Note that this method is deprecated since this app now supports optionalSso
|
||||||
ldap_status=$(mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" -N -B -e "select is_actived from login_source WHERE name='cloudron';")
|
ldap_status=$(mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e "select is_actived from login_source WHERE name='cloudron';")
|
||||||
[[ -z "${ldap_status}" ]] && ldap_status="1"
|
[[ -z "${ldap_status}" ]] && ldap_status="1"
|
||||||
|
|
||||||
now=$(date +%s)
|
now=$(date +%s)
|
||||||
|
|
||||||
if mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" \
|
if mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" \
|
||||||
-e "REPLACE INTO login_source (id, type, name, is_actived, cfg, created_unix, updated_unix) VALUES (1,2,'cloudron',${ldap_status},'{\"Name\":\"cloudron\",\"Host\":\"${LDAP_SERVER}\",\"Port\":${LDAP_PORT},\"UseSSL\":false,\"SkipVerify\":true,\"BindDN\":\"${LDAP_BIND_DN}\",\"BindPassword\":\"${LDAP_BIND_PASSWORD}\",\"UserBase\":\"${LDAP_USERS_BASE_DN}\",\"AttributeUsername\":\"username\",\"AttributeName\":\"displayname\",\"AttributeSurname\":\"\",\"AttributeMail\":\"mail\",\"Filter\":\"(\\\\u007C(mail=%[1]s)(username=%[1]s))\"}','${now}','${now}');"; then
|
-e "REPLACE INTO login_source (id, type, name, is_actived, cfg, created_unix, updated_unix) VALUES (1,2,'cloudron',${ldap_status},'{\"Name\":\"cloudron\",\"Host\":\"${CLOUDRON_LDAP_SERVER}\",\"Port\":${CLOUDRON_LDAP_PORT},\"UseSSL\":false,\"SkipVerify\":true,\"BindDN\":\"${CLOUDRON_LDAP_BIND_DN}\",\"BindPassword\":\"${CLOUDRON_LDAP_BIND_PASSWORD}\",\"UserBase\":\"${CLOUDRON_LDAP_USERS_BASE_DN}\",\"AttributeUsername\":\"username\",\"AttributeName\":\"displayname\",\"AttributeSurname\":\"\",\"AttributeMail\":\"mail\",\"Filter\":\"(\\\\u007C(mail=%[1]s)(username=%[1]s))\"}','${now}','${now}');"; then
|
||||||
echo "==> LDAP Authentication was setup with activation status ${ldap_status}"
|
echo "==> LDAP Authentication was setup with activation status ${ldap_status}"
|
||||||
else
|
else
|
||||||
echo "==> Failed to setup LDAP authentication"
|
echo "==> Failed to setup LDAP authentication"
|
||||||
@@ -45,11 +45,11 @@ setup_auth() {
|
|||||||
|
|
||||||
echo "==> Gitea is up, setting up auth"
|
echo "==> Gitea is up, setting up auth"
|
||||||
|
|
||||||
if [[ -n "${LDAP_SERVER:-}" ]]; then
|
if [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]]; then
|
||||||
setup_ldap_source
|
setup_ldap_source
|
||||||
fi
|
fi
|
||||||
|
|
||||||
user_count=$(mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" -N -B -e "SELECT count(*) FROM user;")
|
user_count=$(mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e "SELECT count(*) FROM user;")
|
||||||
# be careful, not to create root user for existing LDAP based installs
|
# be careful, not to create root user for existing LDAP based installs
|
||||||
if [[ "${user_count}" == "0" ]]; then
|
if [[ "${user_count}" == "0" ]]; then
|
||||||
echo "==> Setting up root user for first run"
|
echo "==> Setting up root user for first run"
|
||||||
@@ -94,13 +94,13 @@ crudini --merge "/run/gitea/app.ini" < "/app/data/app.ini"
|
|||||||
|
|
||||||
# override important values
|
# override important values
|
||||||
crudini --set "/run/gitea/app.ini" database DB_TYPE mysql
|
crudini --set "/run/gitea/app.ini" database DB_TYPE mysql
|
||||||
crudini --set "/run/gitea/app.ini" database HOST "${MYSQL_HOST}:${MYSQL_PORT}"
|
crudini --set "/run/gitea/app.ini" database HOST "${CLOUDRON_MYSQL_HOST}:${CLOUDRON_MYSQL_PORT}"
|
||||||
crudini --set "/run/gitea/app.ini" database NAME "${MYSQL_DATABASE}"
|
crudini --set "/run/gitea/app.ini" database NAME "${CLOUDRON_MYSQL_DATABASE}"
|
||||||
crudini --set "/run/gitea/app.ini" database USER "${MYSQL_USERNAME}"
|
crudini --set "/run/gitea/app.ini" database USER "${CLOUDRON_MYSQL_USERNAME}"
|
||||||
crudini --set "/run/gitea/app.ini" database PASSWD "${MYSQL_PASSWORD}"
|
crudini --set "/run/gitea/app.ini" database PASSWD "${CLOUDRON_MYSQL_PASSWORD}"
|
||||||
crudini --set "/run/gitea/app.ini" database SSL_MODE "disable"
|
crudini --set "/run/gitea/app.ini" database SSL_MODE "disable"
|
||||||
crudini --set "/run/gitea/app.ini" server PROTOCOL "http"
|
crudini --set "/run/gitea/app.ini" server PROTOCOL "http"
|
||||||
crudini --set "/run/gitea/app.ini" server DOMAIN "${APP_DOMAIN}"
|
crudini --set "/run/gitea/app.ini" server DOMAIN "${CLOUDRON_APP_DOMAIN}"
|
||||||
crudini --set "/run/gitea/app.ini" server ROOT_URL "https://%(DOMAIN)s/"
|
crudini --set "/run/gitea/app.ini" server ROOT_URL "https://%(DOMAIN)s/"
|
||||||
crudini --set "/run/gitea/app.ini" server HTTP_ADDR ""
|
crudini --set "/run/gitea/app.ini" server HTTP_ADDR ""
|
||||||
crudini --set "/run/gitea/app.ini" server HTTP_PORT "3000"
|
crudini --set "/run/gitea/app.ini" server HTTP_PORT "3000"
|
||||||
@@ -109,10 +109,10 @@ crudini --set "/run/gitea/app.ini" server SSH_PORT "${SSH_PORT}"
|
|||||||
crudini --set "/run/gitea/app.ini" server APP_DATA_PATH "/app/data/appdata"
|
crudini --set "/run/gitea/app.ini" server APP_DATA_PATH "/app/data/appdata"
|
||||||
crudini --set "/run/gitea/app.ini" repository ROOT "/app/data/repository"
|
crudini --set "/run/gitea/app.ini" repository ROOT "/app/data/repository"
|
||||||
crudini --set "/run/gitea/app.ini" repository.upload TEMP_PATH "/run/gitea/tmp/uploads"
|
crudini --set "/run/gitea/app.ini" repository.upload TEMP_PATH "/run/gitea/tmp/uploads"
|
||||||
crudini --set "/run/gitea/app.ini" mailer HOST "${MAIL_SMTP_SERVER}:${MAIL_SMTPS_PORT}"
|
crudini --set "/run/gitea/app.ini" mailer HOST "${CLOUDRON_MAIL_SMTP_SERVER}:${CLOUDRON_MAIL_SMTPS_PORT}"
|
||||||
crudini --set "/run/gitea/app.ini" mailer USER "${MAIL_SMTP_USERNAME}"
|
crudini --set "/run/gitea/app.ini" mailer USER "${CLOUDRON_MAIL_SMTP_USERNAME}"
|
||||||
crudini --set "/run/gitea/app.ini" mailer PASSWD "${MAIL_SMTP_PASSWORD}"
|
crudini --set "/run/gitea/app.ini" mailer PASSWD "${CLOUDRON_MAIL_SMTP_PASSWORD}"
|
||||||
crudini --set "/run/gitea/app.ini" mailer FROM "${MAIL_FROM}"
|
crudini --set "/run/gitea/app.ini" mailer FROM "${CLOUDRON_MAIL_FROM}"
|
||||||
crudini --set "/run/gitea/app.ini" mailer SKIP_VERIFY "true"
|
crudini --set "/run/gitea/app.ini" mailer SKIP_VERIFY "true"
|
||||||
crudini --set "/run/gitea/app.ini" security INSTALL_LOCK "true"
|
crudini --set "/run/gitea/app.ini" security INSTALL_LOCK "true"
|
||||||
crudini --set "/run/gitea/app.ini" log MODE "console"
|
crudini --set "/run/gitea/app.ini" log MODE "console"
|
||||||
|
8
test/package-lock.json
generated
8
test/package-lock.json
generated
@@ -351,12 +351,6 @@
|
|||||||
"safer-buffer": "^2.1.0"
|
"safer-buffer": "^2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ejs": {
|
|
||||||
"version": "2.6.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz",
|
|
||||||
"integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"emoji-regex": {
|
"emoji-regex": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||||
@@ -1273,7 +1267,7 @@
|
|||||||
},
|
},
|
||||||
"reduce-component": {
|
"reduce-component": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "http://registry.npmjs.org/reduce-component/-/reduce-component-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/reduce-component/-/reduce-component-1.0.1.tgz",
|
||||||
"integrity": "sha1-4Mk1QsV0UhvqE98PlIjtgqt3xdo="
|
"integrity": "sha1-4Mk1QsV0UhvqE98PlIjtgqt3xdo="
|
||||||
},
|
},
|
||||||
"request": {
|
"request": {
|
||||||
|
@@ -9,9 +9,7 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ejs": "^2.6.1",
|
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mkdirp": "^0.5.1",
|
|
||||||
"mocha": "^6.1.4",
|
"mocha": "^6.1.4",
|
||||||
"rimraf": "^2.6.3",
|
"rimraf": "^2.6.3",
|
||||||
"superagent": "^5.0.5"
|
"superagent": "^5.0.5"
|
||||||
|
@@ -12,14 +12,11 @@
|
|||||||
require('chromedriver');
|
require('chromedriver');
|
||||||
|
|
||||||
var execSync = require('child_process').execSync,
|
var execSync = require('child_process').execSync,
|
||||||
ejs = require('ejs'),
|
|
||||||
expect = require('expect.js'),
|
expect = require('expect.js'),
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
mkdirp = require('mkdirp'),
|
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
rimraf = require('rimraf'),
|
rimraf = require('rimraf'),
|
||||||
superagent = require('superagent'),
|
superagent = require('superagent');
|
||||||
webdriver = require('selenium-webdriver');
|
|
||||||
|
|
||||||
var by = require('selenium-webdriver').By,
|
var by = require('selenium-webdriver').By,
|
||||||
until = require('selenium-webdriver').until,
|
until = require('selenium-webdriver').until,
|
||||||
@@ -418,7 +415,7 @@ return done();
|
|||||||
|
|
||||||
// No SSO
|
// No SSO
|
||||||
it('install app (no sso)', function () {
|
it('install app (no sso)', function () {
|
||||||
execSync('cloudron install --new --wait --no-sso --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync(`cloudron install --new --wait --no-sso --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can get app information', function () {
|
it('can get app information', function () {
|
||||||
|
Reference in New Issue
Block a user