├── .gitignore
├── example
├── nginx
│ ├── icons
│ │ └── .gitkeep
│ ├── build
│ │ └── nginx_1.11_x86_64.qpkg
│ ├── shared
│ │ ├── wizard
│ │ │ ├── description
│ │ │ │ ├── cht.md
│ │ │ │ └── eng.md
│ │ │ ├── i18n
│ │ │ │ ├── cht.json
│ │ │ │ └── eng.json
│ │ │ └── install.json
│ │ ├── docker-compose.yml
│ │ ├── nginx.apache.conf.tpl
│ │ └── nginx.sh
│ ├── qpkg.cfg
│ └── package_routines
├── gitlab
│ ├── icons
│ │ └── .gitkeep
│ ├── build
│ │ └── gitlab_8.16.6_x86_64.qpkg
│ ├── shared
│ │ ├── gitlab.apache.conf.tpl
│ │ ├── wizard
│ │ │ ├── description
│ │ │ │ ├── chs.md
│ │ │ │ ├── cht.md
│ │ │ │ ├── kor.md
│ │ │ │ ├── jpn.md
│ │ │ │ ├── eng.md
│ │ │ │ ├── nor.md
│ │ │ │ ├── tha.md
│ │ │ │ ├── ita.md
│ │ │ │ ├── dan.md
│ │ │ │ ├── dut.md
│ │ │ │ ├── swe.md
│ │ │ │ ├── cze.md
│ │ │ │ ├── fin.md
│ │ │ │ ├── hun.md
│ │ │ │ ├── rus.md
│ │ │ │ ├── ger.md
│ │ │ │ ├── rom.md
│ │ │ │ ├── por.md
│ │ │ │ ├── tur.md
│ │ │ │ ├── fre.md
│ │ │ │ ├── spa.md
│ │ │ │ ├── pol.md
│ │ │ │ └── grk.md
│ │ │ ├── i18n
│ │ │ │ ├── cht.json
│ │ │ │ └── eng.json
│ │ │ └── install.json
│ │ ├── gitlab.sh
│ │ └── docker-compose.yml
│ ├── qpkg.cfg
│ └── package_routines
├── joomla
│ ├── icons
│ │ └── .gitkeep
│ ├── shared
│ │ ├── joomla.apache.conf
│ │ ├── docker-compose.yml
│ │ └── joomla.sh
│ ├── qpkg.cfg
│ └── package_routines
├── redmine
│ ├── icons
│ │ └── .gitkeep
│ ├── shared
│ │ ├── redmine.apache.conf
│ │ ├── docker-compose.yml
│ │ └── redmine.sh
│ ├── qpkg.cfg
│ └── package_routines
└── Makefile
├── Dockerfile
├── app.sh
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | **/build/
2 |
--------------------------------------------------------------------------------
/example/nginx/icons/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/gitlab/icons/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/joomla/icons/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/redmine/icons/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/nginx/build/nginx_1.11_x86_64.qpkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fcwu/docker-qdk2/HEAD/example/nginx/build/nginx_1.11_x86_64.qpkg
--------------------------------------------------------------------------------
/example/gitlab/build/gitlab_8.16.6_x86_64.qpkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fcwu/docker-qdk2/HEAD/example/gitlab/build/gitlab_8.16.6_x86_64.qpkg
--------------------------------------------------------------------------------
/example/nginx/shared/wizard/description/cht.md:
--------------------------------------------------------------------------------
1 | ## 描述
2 | Nginx(發音同 "engine x")是一個開源的網頁伺服器,它能反向代理HTTP, HTTPS, SMTP, POP3, IMAP的協議鏈接,以及一個負載均衡器和一個HTTP緩存。
3 |
--------------------------------------------------------------------------------
/example/nginx/shared/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 | nginx:
5 | image: nginx:1.13-alpine
6 | ports:
7 | - "0.0.0.0:18080:80"
8 |
--------------------------------------------------------------------------------
/example/joomla/shared/joomla.apache.conf:
--------------------------------------------------------------------------------
1 | ProxyRequests off
2 | ProxyPass /joomla/ http://127.0.0.1:10082/joomla/
3 | ProxyPassReverse /joomla/ http://127.0.0.1:10082/joomla/
4 |
--------------------------------------------------------------------------------
/example/nginx/shared/nginx.apache.conf.tpl:
--------------------------------------------------------------------------------
1 | ProxyRequests off
2 | ProxyPass /nginx http://127.0.0.1:<@http_port@>
3 | ProxyPassReverse /nginx http://127.0.0.1:<@http_port@>
4 |
--------------------------------------------------------------------------------
/example/nginx/shared/wizard/i18n/cht.json:
--------------------------------------------------------------------------------
1 | {
2 | "NGINX_NAME": "Nginx",
3 | "NGINX_BASE_PAGE": "設定服務",
4 | "NGINX_WEB_HOST_PORT_DESC": "設定網頁伺服器的 Port,預設是 18080",
5 | }
6 |
--------------------------------------------------------------------------------
/example/redmine/shared/redmine.apache.conf:
--------------------------------------------------------------------------------
1 | ProxyRequests off
2 | ProxyPass /redmine http://127.0.0.1:10083/redmine
3 | ProxyPassReverse /redmine http://127.0.0.1:10083/redmine
4 |
--------------------------------------------------------------------------------
/example/gitlab/shared/gitlab.apache.conf.tpl:
--------------------------------------------------------------------------------
1 | ProxyRequests off
2 | ProxyPass /gitlab http://127.0.0.1:<@http_port@>/gitlab
3 | ProxyPassReverse /gitlab http://127.0.0.1:<@http_port@>/gitlab
4 |
--------------------------------------------------------------------------------
/example/nginx/shared/wizard/i18n/eng.json:
--------------------------------------------------------------------------------
1 | {
2 | "NGINX_NAME": "Nginx",
3 | "NGINX_BASE_PAGE": "Configure service",
4 | "NGINX_WEB_HOST_PORT_DESC": "The port of the web server. Defaults to 18080."
5 | }
6 |
--------------------------------------------------------------------------------
/example/nginx/shared/wizard/description/eng.md:
--------------------------------------------------------------------------------
1 | ## Description
2 | Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server).
3 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/chs.md:
--------------------------------------------------------------------------------
1 | ## 必备条件
2 | 要运行GitLab,您的Docker主机必须具备至少1 GB可用内存。有关GitLab硬件要求的更多信息,请转到 https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | 注意:启动GitLab可能需要数分钟时间。
5 |
6 | 请用默认用户名和密码登录:
7 |
8 | 用户名: **root**
9 |
10 | 密码: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/cht.md:
--------------------------------------------------------------------------------
1 | ## 必備條件
2 | 您的 Docker Host 必須具備至少 1 GB 記憶體方能執行 GitLab。若要進一步瞭解 GitLab 硬體需求,請前往 https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | 注意:啟動GitLab服務可能需時數分鐘。
5 |
6 | 請以預設的使用者名稱與密碼登入:
7 |
8 | 使用者名稱: **root**
9 |
10 | 密碼: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/kor.md:
--------------------------------------------------------------------------------
1 | ## 필요사항
2 | GitLab을실행하려면Docker호스트에최소1GB의사용가능한RAM이필요합니다. GitLab하드웨어요구사항에대한자세한내용은https://docs.gitlab.com/ce/install/requirements.html로이동하십시오.
3 |
4 | 참고: GitLab은시작하려면몇분이소요될수있습니다.
5 |
6 | 기본사용자이름및비밀번호로로그인:
7 |
8 | 사용자이름: **root**
9 |
10 | 비밀번호: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/jpn.md:
--------------------------------------------------------------------------------
1 | ## 前提条件
2 | GitLab を実行するには、Docker ホスト用に少なくとも 1 GB の利用可能な RAM が必要です。 GitLab のハードウェア要件に関する詳細情報については、https://docs.gitlab.com/ce/install/requirements.html にアクセスしてください
3 |
4 | 注記: GitLab は、起動に数分間かかる場合があります。
5 |
6 | デフォルトのユーザー名とパスワードでログインします:
7 |
8 | ユーザー名: **root**
9 |
10 | パスワード: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:14.04
2 | MAINTAINER Doro Wu
3 |
4 | # Install.
5 | RUN apt-get update \
6 | && apt-get install -y software-properties-common \
7 | && add-apt-repository -y ppa:chris-lea/node.js \
8 | && add-apt-repository -y ppa:fcwu-tw/ppa \
9 | && apt-get update \
10 | && apt-get install -y build-essential unzip curl wget git qdk2 realpath moreutils fakeroot \
11 | && apt-get clean \
12 | && rm -rf /var/lib/apt/lists/*
13 |
14 | ADD app.sh /
15 | ENTRYPOINT ["/app.sh"]
16 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/eng.md:
--------------------------------------------------------------------------------
1 | ## Prerequisites
2 | To run GitLab, a minimum of 1 GB of available RAM is required for your Docker host. For more information about GitLab hardware requirements, go to https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Note: GitLab may need a few minutes to start.
5 |
6 | Log in with the default username and password:
7 |
8 | Username: **root**
9 |
10 | Password: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/nor.md:
--------------------------------------------------------------------------------
1 | ## Forutsetninger
2 | Hvis du vil kjøre GitLab, må det være minimum 1 GB tilgjengelig RAM for Docker-verten. Du finner mer informasjon om maskinvarekravene til GitLab på https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Merk: Det kan ta et par minutter å starte GitLab.
5 |
6 | Logg på med standard brukernavn og passord:
7 |
8 | Brukernavn: **root**
9 |
10 | Passord: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/tha.md:
--------------------------------------------------------------------------------
1 | ## ข้อกำหนดเบื้องต้น
2 | ในการเรียกใช้งาน GitLab จะต้องมี RAM ขั้นต่ำขนาด 1 GB สำหรับโฮสต์แท่นเสียบของคุณ สำหรับข้อมูลเพิ่มเติมเกี่ยวกับข้อกำหนดฮาร์ดแวร์ GitLab ให้ไปท https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | หมายเหตุ: GitLab อาจใช้เวลาสองสามนาทีเพื่อเริ่มต้น
5 |
6 | เข้าสู่ระบบด้วยชื่อผู้ใช้และรหัสผ่านเริ่มต้น
7 |
8 | ชื่อผู้ใช้: **root**
9 |
10 | รหัสผ่าน: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/joomla/shared/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 | mariadb:
5 | image: mariadb:10.1
6 | environment:
7 | - MYSQL_ROOT_PASSWORD=admin
8 | - MYSQL_USER=joomla
9 | - MYSQL_PASSWORD=joomla
10 | - MYSQL_DATABASE=joomla
11 | joomla:
12 | image: seterrychen/joomla-nginx-fpm:3.6.0
13 | depends_on:
14 | - mariadb
15 | ports:
16 | - "127.0.0.1:10082:80"
17 | environment:
18 | - DB_HOST=mariadb
19 | - JOOMLA_RELATIVE_URL_ROOT=/joomla
20 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/ita.md:
--------------------------------------------------------------------------------
1 | ## Prerequisiti
2 | Per eseguire GitLab, è richiesto almeno 1 GB di RAM disponibile per l'host Docker. Per maggiori informazioni sui requisiti hardware GitLab, andare su https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Nota: GitLab potrebbe richiedere alcuni minuti per l'avvio.
5 |
6 | Accedere con nome utente e password predefiniti:
7 |
8 | Nome utente: **root**
9 |
10 | Password: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/dan.md:
--------------------------------------------------------------------------------
1 | ## Forudsætninger
2 | For at kunne køre GitLab, kræves der mindst 1 GB tilgængelig RAM for din Docker host. For yderligere oplysninger om GitLab hardwarekrav, henvises der til https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Bemærk: GitLab kan behøve nogle få minutter til at starte.
5 |
6 | Log ind med standard brugernavn og adgangskode:
7 |
8 | Brugernavn: **root**
9 |
10 | Adgangskode: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/dut.md:
--------------------------------------------------------------------------------
1 | ## Vereisten
2 | Er is minimaal 1 GB aan beschikbaar RAM-geheugen nodig voor uw Docker-host om GitLab te kunnen uitvoeren. Ga voor meer informatie over de hardwarevereisten van https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Opmerking: GitLab heeft enkele minuten nodig om te starten.
5 |
6 | Inloggen met de standaard gebruikersnaam en wachtwoord:
7 |
8 | Gebruikersnaam: **root**
9 |
10 | Wachtwoord: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/swe.md:
--------------------------------------------------------------------------------
1 | ## Förutsättningar och krav
2 | För att kunna köra GitLab krävs tillgängligt RAM-minne på minst 1 GB för din Docker-värd. För mer information om maskinvarukraven för GitLab går du till https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | OBS! Det kan ta några minuter innan GitLab startat.
5 |
6 | Logga in med standardanvändarnamnet och standardlösenordet:
7 |
8 | Användarnamn: **root**
9 |
10 | Lösenord: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/cze.md:
--------------------------------------------------------------------------------
1 | ## Předpoklady
2 | Chcete-li provozovat GitLab, musíte mít ve svém hostitelském počítač Docker alespoň 1 GB dostupné RAM. Další informace o hardwarových požadavcích na GitLab najdete na https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Poznámka: GitLab může potřebovat několik minut na spuštění.
5 |
6 | Přihlaste se pod implicitním uživatelským jménem a heslem:
7 |
8 | Uživatelské jméno: **root**
9 |
10 | Heslo: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/fin.md:
--------------------------------------------------------------------------------
1 | ## Edellytykset
2 | GitLabin käyttämiseen vaaditaan vähintään 1 Gt käytettävissä olevaa RAM-muistia Docker-isäntää varten. Katso lisätietoja GitLab-laitteistovaatimuksista osoitteesta https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Huomautus: GitLabin käynnistyminen voi kestää muutaman minuutin.
5 |
6 | Kirjaudu sisään oletuskäyttäjänimellä ja -salasanalla:
7 |
8 | Käyttäjänimi: **root**
9 |
10 | Salasana: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/hun.md:
--------------------------------------------------------------------------------
1 | ## Előfeltételek
2 | A GitLab futtatásához legalább 1 GB elérhető RAM szükésges a Docker gazdagépen. Bővebb információkért a GitLab hardverkövetelményeiről látogasson el a https://docs.gitlab.com/ce/install/requirements.html címre
3 |
4 | Megjegyzés: A GitLab elindítása néhány percet igénybe vehet.
5 |
6 | Jelentkezzen be az alapértelmezett felhasználónévvel és jelszóval:
7 |
8 | Felhasználónév: **root**
9 |
10 | Jelszó: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/rus.md:
--------------------------------------------------------------------------------
1 | ## Необходимые условия
2 | Для запуска GitLab на хосте Docker должно быть свободно не менее 1 ГБ ОЗУ. Подробные сведения о требованиях к оборудованию для GitLab представлены на веб-сайте https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Примечание: запуск GitLab может занять несколько минут.
5 |
6 | Выполнив вход с именем пользователя и паролем по умолчанию:
7 |
8 | Имя пользователя: **root**
9 |
10 | Пароль: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/ger.md:
--------------------------------------------------------------------------------
1 | ## Voraussetzungen
2 | Zum Ausführen von GitLab wird für Ihren Docker-Host mindestens 1 GB verfügbaren RAM benötigt. Weitere Informationen über GitLab-Hardwareanforderungen finden Sie unter https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Hinweis: Das Starten von GitLab kann einige Minuten erfordern.
5 |
6 | Melden Sie sich mit Standardnutzernamen und Standardkennwort an:
7 |
8 | Nutzername: **root**
9 |
10 | Kennwort: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/rom.md:
--------------------------------------------------------------------------------
1 | ## Cerinţe preliminare:
2 | Pentru a executa GitLab aveţi nevoie de cel puţin 1 GB de memorie RAM disponibilă pentru gazda Docker. Pentru mai multe informaţii despre cerinţele hardware pentru GitLab, accesaţi https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Notă: pornirea GitLab poate dura câteva minute.
5 |
6 | Conectaţi-vă cu numele de utilizator şi parola implicite:
7 |
8 | Nume utilizator: **root**
9 |
10 | Parolă: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/Makefile:
--------------------------------------------------------------------------------
1 |
2 | all: gitlab nginx redmine joomla
3 |
4 | gitlab:
5 | cd gitlab && /usr/share/qdk2/QDK/bin/qbuild --build-dir build --build-arch x86_64
6 |
7 | nginx:
8 | cd nginx && /usr/share/qdk2/QDK/bin/qbuild --build-dir build --build-arch x86_64
9 |
10 | redmine:
11 | cd redmine && /usr/share/qdk2/QDK/bin/qbuild --build-dir build --build-arch x86_64
12 |
13 | joomla:
14 | cd joomla && /usr/share/qdk2/QDK/bin/qbuild --build-dir build --build-arch x86_64
15 |
16 |
17 | clean:
18 | sudo rm -f */build/*.qpkg
19 |
20 | .PHONY: all clean gitlab nginx redmine joomla
21 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/por.md:
--------------------------------------------------------------------------------
1 | ## Pré-requisitos
2 | Para executar o GitLab, um mínimo de 1 GB de memória RAM disponível é necessário para o seu host Docker. Para obter mais informações sobre requisitos de hardware do GitLab, vá para https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Observação: O GitLab pode precisar de alguns minutos para começar.
5 |
6 | Faça login usando seu nome de usuário e senha padrão:
7 |
8 | Nome de usuário: **root**
9 |
10 | Senha: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/tur.md:
--------------------------------------------------------------------------------
1 | ## Ön Koşullar
2 | GitLab uygulamasını çalıştırmak için, Docker ana bilgisayarınıza yönelik en az 1 GB kullanılabilir bellek gereklidir. GitLab donanım gereksinimleri konusunda daha fazla bilgi için https://docs.gitlab.com/ce/install/requirements.html adresine gidin.
3 |
4 | Not: GitLab uygulamasının başlaması birkaç dakika sürebilir.
5 |
6 | Varsayılan kullanıcı adı ve şifreyle oturum açın:
7 |
8 | Kullanıcı adı: **root**
9 |
10 | Şifre: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/fre.md:
--------------------------------------------------------------------------------
1 | ## Prérequis
2 | Pour exécuter GitLab, un minimum de 1 Go de RAM disponible est requis pour votre hôte Docker. Pour plus d'informations sur les exigences matérielles de GitLab, rendez-vous ici : https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Remarque : GitLab peut prendre quelques minutes à démarrer.
5 |
6 | Connectez-vous avec le nom d'utilisateur et mot de passe par défaut :
7 |
8 | Nom d'utilisateur: **root**
9 |
10 | Mot de passe: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/spa.md:
--------------------------------------------------------------------------------
1 | ## Prerrequisitos
2 | Para ejecutar GitLab, se necesita como mínimo 1 GB de memoria RAM disponible para su host Docker. Para más información sobre los requisitos del hardware GitLab, vaya a https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Nota: Es posible que GitLab necesite algunos minutos para iniciarse.
5 |
6 | Inicie sesión usando su nombre de usuario y contraseña predeterminados.
7 |
8 | Nombre de usuario: **root**
9 |
10 | Contraseña: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/pol.md:
--------------------------------------------------------------------------------
1 | ## Wymagania wstępne
2 | Aby uruchamiać aplikację GitLab, host aplikacji Docker musi mieć co najmniej 1 GB dostępnej pamięci RAM. Więcej informacji na temat wymagań sprzętowych aplikacji GitLab można znaleźć na stronie https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Uwaga: Uruchomienie aplikacji GitLab może potrwać kilka minut.
5 |
6 | Zaloguj się przy użyciu domyślnej nazwy użytkownika i hasła:
7 |
8 | Nazwa użytkownika: **root**
9 |
10 | Hasło: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/description/grk.md:
--------------------------------------------------------------------------------
1 | ## Προϋποθέσεις
2 | Για την εκτέλεση του GitLab, απαιτείται τουλάχιστον 1 GB διαθέσιμης μνήμης RAM για τον κεντρικό υπολογιστή Docker σας. Για περισσότερες πληροφορίες σχετικά με τις απαιτήσεις υλικού του GitLab, μεταβείτε στο https://docs.gitlab.com/ce/install/requirements.html
3 |
4 | Σημείωση: Το GitLab μπορεί να χρειαστεί μερικά λεπτά για να ξεκινήσει.
5 |
6 | Συνδεθείτε με το προεπιλεγμένο όνομα χρήστη και τον κωδικό πρόσβασης:
7 |
8 | Όνομα χρήστη: **root**
9 |
10 | Κωδικός πρόσβασης: **5iveL!fe**
11 |
--------------------------------------------------------------------------------
/app.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -e
2 |
3 | [ "$#" -eq 0 ] && {
4 | [ -d "/src" ] || {
5 | echo "No /src found"
6 | exit 0
7 | }
8 | cd /src
9 | # build
10 | /usr/share/qdk2/QDK/bin/qbuild --build-dir ../build --build-arch x86_64
11 | # check file
12 | qpkgfile=`stat -c "%n" ../build/*.qpkg`
13 | qpkgbasename=`basename $qpkgfile`
14 | [ -f "$qpkgfile" ] || { echo "No QPKG found"; exit 1; }
15 | # copy back
16 | cp "$qpkgfile" ./
17 | # set owner
18 | uid=`stat -c "%u" qpkg.cfg`
19 | gid=`stat -c "%g" qpkg.cfg`
20 | chown $uid:$gid $qpkgbasename
21 | ls -l "$qpkgbasename"
22 | exit 0
23 | }
24 |
25 | exec "$@"
26 |
--------------------------------------------------------------------------------
/example/nginx/shared/wizard/install.json:
--------------------------------------------------------------------------------
1 | {
2 | "api_version": "v1",
3 | "title": "{{NGINX_NAME}}",
4 | "wizard": [
5 | {
6 | "title": "{{NGINX_BASE_PAGE}}",
7 | "schema": {
8 | "http_port": {
9 | "title": "HTTP Port",
10 | "type": "integer",
11 | "description": "{{NGINX_WEB_HOST_PORT_DESC}}",
12 | "minimum": 1,
13 | "maximum": 65535,
14 | "required": true
15 | }
16 | },
17 | "form": [
18 | "http_port"
19 | ]
20 | }
21 | ],
22 | "binding": {
23 | "type": "yaml",
24 | "file": "docker-compose.yml",
25 | "data": {
26 | "http_port": "services.nginx.ports[0]"
27 | },
28 | "template": ["*.tpl"]
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/example/redmine/shared/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 | postgresql:
5 | image: sameersbn/postgresql:9.5-2
6 | environment:
7 | - DB_USER=redmine
8 | - DB_PASS=password
9 | - DB_NAME=redmine_production
10 | volumes:
11 | - ./postgresql:/var/lib/postgresql
12 |
13 | redmine:
14 | image: sameersbn/redmine:3.3.0-4
15 | depends_on:
16 | - postgresql
17 | environment:
18 | - DB_ADAPTER=postgresql
19 | - DB_HOST=postgresql
20 | - DB_PORT=5432
21 | - DB_USER=redmine
22 | - DB_PASS=password
23 | - DB_NAME=redmine_production
24 |
25 | - REDMINE_PORT=10083
26 | - REDMINE_HTTPS=false
27 | - REDMINE_RELATIVE_URL_ROOT=/redmine/
28 |
29 | ports:
30 | - "127.0.0.1:10083:80"
31 | volumes:
32 | - ./redmine:/home/redmine/data
33 |
--------------------------------------------------------------------------------
/example/gitlab/shared/gitlab.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | QPKG_CONF=/etc/config/qpkg.conf
3 | QPKG_NAME=gitlab
4 | QPKG_DISPLAY_NAME=$(/sbin/getcfg $QPKG_NAME Display_Name -f $QPKG_CONF)
5 | CONTAINER_STATION_DIR=$(/sbin/getcfg container-station Install_Path -f $QPKG_CONF)
6 |
7 | # source qpkg/dqpkg functions
8 | QTS_LOG_TAG="$QPKG_DISPLAY_NAME"
9 | . $CONTAINER_STATION_DIR/script/qpkg-functions
10 | . $CONTAINER_STATION_DIR/script/dqpkg-functions
11 |
12 | # main
13 | case "$1" in
14 | start)
15 | if ! qts_qpkg_is_enabled $QPKG_NAME; then
16 | qts_error_exit "$QPKG_DISPLAY_NAME is disabled."
17 | fi
18 | wait_qcs_ready
19 | qbus_cmd start
20 | complete_action "configure installing installed starting running stopping stopped" 120
21 | ;;
22 |
23 | stop)
24 | qbus_cmd stop
25 | complete_action "removed stopped" 30
26 | ;;
27 |
28 | restart)
29 | $0 stop
30 | $0 start
31 | ;;
32 |
33 | remove)
34 | qbus_cmd remove
35 | complete_action "removed" 60
36 | ;;
37 | *)
38 | echo "Usage: $0 {start|stop|restart}"
39 | exit 1
40 | esac
41 |
42 | exit 0
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Create Docker App on QNAP NAS in QPKG format
2 | ============================================
3 |
4 | NOTE: Before starting to pack QPKG, install docker.
5 |
6 | This repo provides Docker image [dorowu/qdk2-build](https://hub.docker.com/r/dorowu/qdk2-build/) and a sample QPKG source of [Redmine](http://www.redmine.org/), a blogging platform to show how easily to pack Dockerized QPKG.
7 |
8 | Steps
9 | =========================
10 | ```
11 | $ git clone https://github.com/qnap-dev/docker-qdk2.git
12 | $ cd docker-qdk2
13 | $ docker run -it --rm -v ${PWD}/example/redmine:/src dorowu/qdk2-build
14 | Creating archive with data files...
15 | tar: 10kB 0:00:00 [18.8MB/s] [=========================================================] 158%
16 | Creating archive with control files...
17 | Creating QPKG package...
18 | -rw-r--r-- 1 1000 1000 24337 Mar 17 02:35 redmine_3.3.0_x86_64.qpkg
19 | $ ls -l example/redmine/redmine_3.3.0.qpkg
20 | -rw-r--r-- 1 u u 24337 Mar 17 10:35 example/redmine/redmine_3.3.0_x86_64.qpkg
21 | ```
22 |
23 | A QPKG was created in `example/redmine/build/redmine_3.3.0_x86_64.qpkg`. Make sure there is Container Station installed on QNAP NAS, then manually install it in App Center.
24 |
--------------------------------------------------------------------------------
/example/gitlab/shared/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 | redis:
5 | restart: always
6 | image: sameersbn/redis:latest
7 | command:
8 | - --loglevel warning
9 | volumes:
10 | - ${PWD}/data/redis:/var/lib/redis:Z
11 |
12 | postgresql:
13 | restart: always
14 | image: sameersbn/postgresql:9.6-2
15 | environment:
16 | - DB_USER=gitlab
17 | - DB_PASS=password
18 | - DB_NAME=gitlabhq_production
19 | - DB_EXTENSION=pg_trgm
20 | volumes:
21 | - ${PWD}/data/postgresql:/var/lib/postgresql:Z
22 |
23 | gitlab:
24 | restart: always
25 | image: sameersbn/gitlab:8.16.6
26 | depends_on:
27 | - redis
28 | - postgresql
29 | ports:
30 | - "10080:80"
31 | - "10022:22"
32 | environment:
33 | - DEBUG=false
34 |
35 | - DB_ADAPTER=postgresql
36 | - DB_HOST=postgresql
37 | - DB_PORT=5432
38 | - DB_USER=gitlab
39 | - DB_PASS=password
40 | - DB_NAME=gitlabhq_production
41 |
42 | - REDIS_HOST=redis
43 | - REDIS_PORT=6379
44 |
45 | - GITLAB_HOST=
46 | - GITLAB_PORT=10080
47 | - GITLAB_SSH_PORT=10022
48 | - GITLAB_RELATIVE_URL_ROOT=/gitlab/
49 | - GITLAB_SECRETS_DB_KEY_BASE=qcs-gitlab-app
50 | - GITLAB_SECRETS_SECRET_KEY_BASE=qcs-gitlab-app
51 | - GITLAB_SECRETS_OTP_KEY_BASE=qcs-gitlab-app
52 |
53 | - GITLAB_ROOT_EMAIL=
54 | - GITLAB_ROOT_PASSWORD=
55 |
56 | - SMTP_ENABLED=false
57 | - SMTP_HOST=smtp.gmail.com
58 | - SMTP_PORT=587
59 | - SMTP_USER=
60 | - SMTP_PASS=
61 | - SMTP_TLS=false
62 | volumes:
63 | - ${PWD}/data/gitlab:/home/git/data:Z
64 |
--------------------------------------------------------------------------------
/example/joomla/shared/joomla.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | QPKG_CONF=/etc/config/qpkg.conf
3 | QPKG_NAME=joomla
4 | DOCKER=system-docker
5 | CONTAINER_STATION_DIR=$(/sbin/getcfg container-station Install_Path -f $QPKG_CONF)
6 | JQ=$CONTAINER_STATION_DIR/usr/bin/jq
7 | QBUS=$CONTAINER_STATION_DIR/bin/qbus
8 | URI=com.qnap.dqpkg/qpkg/$QPKG_NAME
9 |
10 | qbus_cmd() {
11 | $QBUS post com.qnap.dqpkg/qpkg \
12 | '{"qpkg": "'$QPKG_NAME'", "action": "'$1'"}'
13 | }
14 |
15 |
16 | complete_action() {
17 | echo Expected result: $1
18 | echo Timeout: $2
19 | for ((i=0; i<=$2; i++)); do
20 | state=`$QBUS get $URI | $JQ .result.state | sed 's/\"//g'`
21 | progress=`$QBUS get $URI | $JQ .result.progress`
22 | echo Current state: $state
23 | echo Current progress: $progress
24 | if [ $progress -eq -1 ] && [ $1 == "running" ]; then
25 | /sbin/setcfg $QPKG_NAME Enable FALSE -f /etc/config/qpkg.conf
26 | break
27 | fi
28 | if [ $state == "installing" ] && [ $1 == "running" ]; then
29 | break
30 | fi
31 | if [ $state == $1 ]; then
32 | echo Matched!
33 | break
34 | fi
35 | sleep 1;
36 | done
37 | }
38 |
39 |
40 | case "$1" in
41 | start)
42 | ENABLED=$(/sbin/getcfg $QPKG_NAME Enable -u -d FALSE -f $QPKG_CONF)
43 | if [ "$ENABLED" != "TRUE" ]; then
44 | echo "$QPKG_NAME is disabled."
45 | exit 1
46 | fi
47 | qbus_cmd start
48 | complete_action running 120
49 | ;;
50 |
51 | stop)
52 | qbus_cmd stop
53 | complete_action stopped 30
54 | ;;
55 |
56 | restart)
57 | $0 stop
58 | $0 start
59 | ;;
60 |
61 | remove)
62 | qbus_cmd remove
63 | complete_action init 60
64 | ;;
65 | *)
66 | echo "Usage: $0 {start|stop|restart|remove}"
67 | exit 1
68 | esac
69 |
70 | exit 0
71 |
--------------------------------------------------------------------------------
/example/redmine/shared/redmine.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | QPKG_CONF=/etc/config/qpkg.conf
3 | QPKG_NAME=redmine
4 | DOCKER=system-docker
5 | CONTAINER_STATION_DIR=$(/sbin/getcfg container-station Install_Path -f $QPKG_CONF)
6 | JQ=$CONTAINER_STATION_DIR/usr/bin/jq
7 | QBUS=$CONTAINER_STATION_DIR/bin/qbus
8 | URI=com.qnap.dqpkg/qpkg/$QPKG_NAME
9 |
10 | qbus_cmd() {
11 | $QBUS post com.qnap.dqpkg/qpkg \
12 | '{"qpkg": "'$QPKG_NAME'", "action": "'$1'"}'
13 | }
14 |
15 |
16 | complete_action() {
17 | echo Expected result: $1
18 | echo Timeout: $2
19 | for ((i=0; i<=$2; i++)); do
20 | state=`$QBUS get $URI | $JQ .result.state | sed 's/\"//g'`
21 | progress=`$QBUS get $URI | $JQ .result.progress`
22 | echo Current state: $state
23 | echo Current progress: $progress
24 | if [ $progress -eq -1 ] && [ $1 == "running" ]; then
25 | /sbin/setcfg $QPKG_NAME Enable FALSE -f /etc/config/qpkg.conf
26 | break
27 | fi
28 | if [ $state == "installing" ] && [ $1 == "running" ]; then
29 | break
30 | fi
31 | if [ $state == $1 ]; then
32 | echo Matched!
33 | break
34 | fi
35 | sleep 1;
36 | done
37 | }
38 |
39 |
40 | case "$1" in
41 | start)
42 | ENABLED=$(/sbin/getcfg $QPKG_NAME Enable -u -d FALSE -f $QPKG_CONF)
43 | if [ "$ENABLED" != "TRUE" ]; then
44 | echo "$QPKG_NAME is disabled."
45 | exit 1
46 | fi
47 | qbus_cmd start
48 | complete_action running 120
49 | ;;
50 |
51 | stop)
52 | qbus_cmd stop
53 | complete_action stopped 30
54 | ;;
55 |
56 | restart)
57 | $0 stop
58 | $0 start
59 | ;;
60 |
61 | remove)
62 | qbus_cmd remove
63 | complete_action init 60
64 | ;;
65 | *)
66 | echo "Usage: $0 {start|stop|restart|remove}"
67 | exit 1
68 | esac
69 |
70 | exit 0
71 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/i18n/cht.json:
--------------------------------------------------------------------------------
1 | {
2 | "GITLAB_NAME": "GitLab",
3 | "GITLAB_BASE_PAGE": "設定基本服務",
4 | "GITLAB_HOST": "GitLab 主機名稱",
5 | "GITLAB_HOST_DESC": "將它替換為類似 gitlab.example.com",
6 | "GITLAB_HOST_MSG": "必須以字母或數字開頭和結尾,並且只能包含: a-z, A-Z, 0-9, 句點 (.), 或連字號 (-)",
7 | "GITLAB_WEB_HOST_PORT_DESC": "設定 GitLab 網頁伺服器的 Port,預設是 10080",
8 | "GITLAB_SSH_HOST_PORT_DESC": "設定 GitLab SSH 伺服器的 Port,預設是 10022",
9 | "GITLAB_ROOT_EMAIL": "管理員 Email",
10 | "GITLAB_ROOT_EMAIL_DESC": "設定 GitLab 管理員的 Email",
11 | "GITLAB_ROOT_EMAIL_MSG": "請輸入正確的 Email 位址",
12 | "GITLAB_ROOT_PASSWD": "管理員密碼",
13 | "GITLAB_ROOT_PASSWD_DESC": "設定 GiLab 管理員的密碼",
14 | "GITLAB_SMTP_PAGE": "設定 SMTP 服務",
15 | "GITLAB_SMTP_ENABLED": "啟用 SMTP",
16 | "GITLAB_SMTP_ENABLED_DESC": "啟用 SMTP 寄信功能,如果設定 SMTP_USER 則預設是啟用,反之則預設為不啟用",
17 | "GITLAB_SMTP_HOST": "SMTP 伺服器位址",
18 | "GITLAB_SMTP_HOST_DESC": "設定 SMTP 伺服器位址,預設是 smtp.gmail.com",
19 | "GITLAB_SMTP_PORT": "SMTP 通訊埠",
20 | "GITLAB_SMTP_PORT_DESC": "設定 SMTP 伺服器通訊埠,預設是 587",
21 | "GITLAB_SMTP_USER": "SMTP 使用者",
22 | "GITLAB_SMTP_USER_DESC": "設定 SMTP 伺服器的使用者名稱",
23 | "GITLAB_SMTP_PASS": "SMTP 密碼",
24 | "GITLAB_SMTP_PASS_DESC": "設定 SMTP 伺服器的使用者密碼",
25 | "GITLAB_SMTP_TLS": "使用 SSL/TLS 連線",
26 | "GITLAB_SMTP_TLS_DESC": "啟用 SSL/TLS 連線,預設是不啟用",
27 | "GITLAB_LDAP_PAGE": "設定 LDAP 服務",
28 | "GITLAB_LDAP_ENABLED": "啟用 LDAP",
29 | "GITLAB_LDAP_ENABLED_DESC": "啟用 LDAP 登入功能",
30 | "GITLAB_LDAP_LABEL": "LDAP 登入顯示",
31 | "GITLAB_LDAP_LABEL_DESC": "登入 LDAP 伺服器的顯示標籤,預設是 'LDAP'",
32 | "GITLAB_LDAP_HOST": "LDAP 伺服器位址",
33 | "GITLAB_LDAP_HOST_DESC": "設定 LDAP 伺服器位址",
34 | "GITLAB_LDAP_PORT": "LDAP 通訊埠",
35 | "GITLAB_LDAP_PORT_DESC": "設定 LDAP 伺服器通訊埠,預設是 389",
36 | "GITLAB_LDAP_BIND_DN": "Bind DN",
37 | "GITLAB_LDAP_BIND_DN_DESC": "設定可以存取 LDAP 的使用者",
38 | "GITLAB_LDAP_PASS": "LDAP 密碼",
39 | "GITLAB_LDAP_PASS_DESC": "設定 LDAP 的使用者密碼",
40 | "GITLAB_LDAP_BASE": "Base DN",
41 | "GITLAB_LDAP_BASE_DESC": "我們可以在哪個 LDAP 網域找到使用者,例如:ou=people,dc=mydomain,dc=local"
42 | }
43 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/i18n/eng.json:
--------------------------------------------------------------------------------
1 | {
2 | "GITLAB_NAME": "GitLab",
3 | "GITLAB_BASE_PAGE": "Configure common service",
4 | "GITLAB_HOST": "GitLab Hostname",
5 | "GITLAB_HOST_DESC": "Replace this with something like gitlab.example.com",
6 | "GITLAB_HOST_MSG": "It must start and end with a letter or number and can only contain: a-z, A-Z, 0-9, dot (.), or dash (-)",
7 | "GITLAB_WEB_HOST_PORT_DESC": "The port of the GitLab server. Defaults to 10080",
8 | "GITLAB_SSH_HOST_PORT_DESC": "The SSH port number. Defaults to 10022",
9 | "GITLAB_ROOT_EMAIL": "Root Email",
10 | "GITLAB_ROOT_EMAIL_DESC": "The Email for the root user",
11 | "GITLAB_ROOT_EMAIL_MSG": "Please enter a valid email address",
12 | "GITLAB_ROOT_PASSWD": "Root Password",
13 | "GITLAB_ROOT_PASSWD_DESC": "The password for the root user",
14 | "GITLAB_SMTP_PAGE": "Configure SMTP service",
15 | "GITLAB_SMTP_ENABLED": "Enable SMTP",
16 | "GITLAB_SMTP_ENABLED_DESC": "Enable mail delivery via SMTP. Defaults to true if SMTP_USER is defined, else defaults to false",
17 | "GITLAB_SMTP_HOST": "SMTP Host",
18 | "GITLAB_SMTP_HOST_DESC": "SMTP server host. Defaults to smtp.gmail.com",
19 | "GITLAB_SMTP_PORT": "SMTP Port",
20 | "GITLAB_SMTP_PORT_DESC": "SMTP server port. Defaults to 587",
21 | "GITLAB_SMTP_USER": "SMTP Username",
22 | "GITLAB_SMTP_USER_DESC": "The username for SMTP service",
23 | "GITLAB_SMTP_PASS": "SMTP Password",
24 | "GITLAB_SMTP_PASS_DESC": "The password for SMTP service",
25 | "GITLAB_SMTP_TLS": "SSL/TLS required",
26 | "GITLAB_SMTP_TLS_DESC": "Enable SSL/TLS. Defaults to false",
27 | "GITLAB_LDAP_PAGE": "Configure LDAP service",
28 | "GITLAB_LDAP_ENABLED": "Enable LDAP",
29 | "GITLAB_LDAP_ENABLED_DESC": "Enable LDAP. Defaults to false",
30 | "GITLAB_LDAP_LABEL": "LDAP login label",
31 | "GITLAB_LDAP_LABEL_DESC": "Label to show on login tab for LDAP server. Defaults to 'LDAP'",
32 | "GITLAB_LDAP_HOST": "LDAP Host",
33 | "GITLAB_LDAP_HOST_DESC": "LDAP server host",
34 | "GITLAB_LDAP_PORT": "LDAP Port",
35 | "GITLAB_LDAP_PORT_DESC": "LDAP server Port. Defaults to 389",
36 | "GITLAB_LDAP_BIND_DN": "Bind DN",
37 | "GITLAB_LDAP_BIND_DN_DESC": "Username that has read access to the LDAP",
38 | "GITLAB_LDAP_PASS": "LDAP Password",
39 | "GITLAB_LDAP_PASS_DESC": "The password for LDAP service",
40 | "GITLAB_LDAP_BASE": "Base DN",
41 | "GITLAB_LDAP_BASE_DESC": "Base where we can search for users. For example: ou=people,dc=mydomain,dc=local"
42 | }
43 |
--------------------------------------------------------------------------------
/example/joomla/qpkg.cfg:
--------------------------------------------------------------------------------
1 | # Name of the packaged application.
2 | QPKG_NAME="joomla"
3 | QPKG_DISPLAYNAME="Joomla!"
4 | # Version of the packaged application.
5 | QPKG_VER="3.6.0"
6 | # Author or maintainer of the package
7 | QPKG_AUTHOR="terrychen@qnap.com"
8 | # License for the packaged application
9 | #QPKG_LICENSE=""
10 | # One-line description of the packaged application
11 | QPKG_SUMMARY="Joomla is a Content Management System (CMS) which enables you to build websites and powerful online applications."
12 |
13 | # Preferred number in start/stop sequence.
14 | QPKG_RC_NUM="101"
15 | # Init-script used to control the start and stop of the installed application.
16 | QPKG_SERVICE_PROGRAM="joomla.sh"
17 | QPKG_TIMEOUT="120,60"
18 |
19 | # Specifies any packages required for the current package to operate.
20 | QPKG_REQUIRE="container-station >= 1.7.1978"
21 | # Specifies what packages cannot be installed if the current package
22 | # is to operate properly.
23 | #QPKG_CONFLICT="Python, OPT/sed"
24 | # Name of configuration file (multiple definitions are allowed).
25 | #QPKG_CONFIG="myApp.conf"
26 | #QPKG_CONFIG="/etc/config/myApp.conf"
27 | # Port number used by service program.
28 | #QPKG_SERVICE_PORT=""
29 | # Location of file with running service's PID
30 | #QPKG_SERVICE_PIDFILE=""
31 | # Relative path to web interface
32 | QPKG_WEBUI="/joomla/"
33 | # Port number for the web interface.
34 | QPKG_WEB_PORT="-1"
35 | # Select volume
36 | # 1: support installation
37 | # 2: support migration
38 | # 3 (1+2): support both installation and migration
39 | #QPKG_VOLUME_SELECT="0"
40 |
41 | # Location of the chroot environment (only TS-x09)
42 | #QPKG_ROOTFS=""
43 | # Init-script used to controls the start and stop of the
44 | # installed application (only TS-x09)
45 | #QPKG_SERVICE_PROGRAM_CHROOT=""
46 |
47 | # Location of icons for the packaged application.
48 | #QDK_DATA_DIR_ICONS="icons"
49 | # Location of files specific to arm-x09 packages.
50 | #QDK_DATA_DIR_X09="arm-x09"
51 | # Location of files specific to arm-x19 packages.
52 | #QDK_DATA_DIR_X19="arm-x19"
53 | # Location of files specific to x86 packages.
54 | #QDK_DATA_DIR_X86="x86"
55 | # Location of files specific to x86 (64-bit) packages.
56 | #QDK_DATA_DIR_X86_64="x86_64"
57 | # Location of files common to all architectures.
58 | #QDK_DATA_DIR_SHARED="shared"
59 | # Location of configuration files.
60 | #QDK_DATA_DIR_CONFIG="config"
61 | # Name of local data package.
62 | #QDK_DATA_FILE=""
63 | # Name of extra package (multiple definitions are allowed).
64 | #QDK_EXTRA_FILE=""
65 |
--------------------------------------------------------------------------------
/example/redmine/qpkg.cfg:
--------------------------------------------------------------------------------
1 | # Name of the packaged application.
2 | QPKG_NAME="redmine"
3 | QPKG_DISPLAYNAME="Redmine"
4 | # Version of the packaged application.
5 | QPKG_VER="3.3.0"
6 | # Author or maintainer of the package
7 | QPKG_AUTHOR="terrychen@qnap.com"
8 | # License for the packaged application
9 | #QPKG_LICENSE=""
10 | # One-line description of the packaged application
11 | QPKG_SUMMARY="Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database."
12 |
13 | # Preferred number in start/stop sequence.
14 | QPKG_RC_NUM="101"
15 | # Init-script used to control the start and stop of the installed application.
16 | QPKG_SERVICE_PROGRAM="redmine.sh"
17 | QPKG_TIMEOUT="120,60"
18 |
19 | # Specifies any packages required for the current package to operate.
20 | QPKG_REQUIRE="container-station >= 1.7.1978"
21 | # Specifies what packages cannot be installed if the current package
22 | # is to operate properly.
23 | #QPKG_CONFLICT="Python, OPT/sed"
24 | # Name of configuration file (multiple definitions are allowed).
25 | #QPKG_CONFIG="myApp.conf"
26 | #QPKG_CONFIG="/etc/config/myApp.conf"
27 | # Port number used by service program.
28 | #QPKG_SERVICE_PORT=""
29 | # Location of file with running service's PID
30 | #QPKG_SERVICE_PIDFILE=""
31 | # Relative path to web interface
32 | QPKG_WEBUI="/redmine/"
33 | # Port number for the web interface.
34 | QPKG_WEB_PORT="-1"
35 | # Select volume
36 | # 1: support installation
37 | # 2: support migration
38 | # 3 (1+2): support both installation and migration
39 | #QPKG_VOLUME_SELECT="0"
40 |
41 | # Location of the chroot environment (only TS-x09)
42 | #QPKG_ROOTFS=""
43 | # Init-script used to controls the start and stop of the
44 | # installed application (only TS-x09)
45 | #QPKG_SERVICE_PROGRAM_CHROOT=""
46 |
47 | # Location of icons for the packaged application.
48 | #QDK_DATA_DIR_ICONS="icons"
49 | # Location of files specific to arm-x09 packages.
50 | #QDK_DATA_DIR_X09="arm-x09"
51 | # Location of files specific to arm-x19 packages.
52 | #QDK_DATA_DIR_X19="arm-x19"
53 | # Location of files specific to x86 packages.
54 | #QDK_DATA_DIR_X86="x86"
55 | # Location of files specific to x86 (64-bit) packages.
56 | #QDK_DATA_DIR_X86_64="x86_64"
57 | # Location of files common to all architectures.
58 | #QDK_DATA_DIR_SHARED="shared"
59 | # Location of configuration files.
60 | #QDK_DATA_DIR_CONFIG="config"
61 | # Name of local data package.
62 | #QDK_DATA_FILE=""
63 | # Name of extra package (multiple definitions are allowed).
64 | #QDK_EXTRA_FILE=""
65 |
--------------------------------------------------------------------------------
/example/nginx/qpkg.cfg:
--------------------------------------------------------------------------------
1 | # Name of the packaged application.
2 | QPKG_NAME="nginx"
3 | QPKG_DISPLAYNAME="Nginx"
4 | # Version of the packaged application.
5 | QPKG_VER="1.11"
6 | # Author or maintainer of the package
7 | QPKG_AUTHOR="terrychen@qnap.com"
8 | # License for the packaged application
9 | #QPKG_LICENSE=""
10 | # One-line description of the packaged application
11 | QPKG_SUMMARY="Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server)."
12 |
13 | # Preferred number in start/stop sequence.
14 | QPKG_RC_NUM="101"
15 | # Init-script used to control the start and stop of the installed application.
16 | QPKG_SERVICE_PROGRAM="nginx.sh"
17 | QPKG_TIMEOUT="120,60"
18 |
19 | # Specifies any packages required for the current package to operate.
20 | QPKG_REQUIRE="container-station >= 1.7.1978"
21 | # Specifies what packages cannot be installed if the current package
22 | # is to operate properly.
23 | #QPKG_CONFLICT="Python, OPT/sed"
24 | # Name of configuration file (multiple definitions are allowed).
25 | #QPKG_CONFIG="myApp.conf"
26 | #QPKG_CONFIG="/etc/config/myApp.conf"
27 | # Port number used by service program.
28 | #QPKG_SERVICE_PORT=""
29 | # Location of file with running service's PID
30 | #QPKG_SERVICE_PIDFILE=""
31 | # Relative path to web interface
32 | QPKG_WEBUI="/nginx/"
33 | # Port number for the web interface.
34 | QPKG_WEB_PORT="-1"
35 | # Select volume
36 | # 1: support installation
37 | # 2: support migration
38 | # 3 (1+2): support both installation and migration
39 | #QPKG_VOLUME_SELECT="0"
40 |
41 | # Location of the chroot environment (only TS-x09)
42 | #QPKG_ROOTFS=""
43 | # Init-script used to controls the start and stop of the
44 | # installed application (only TS-x09)
45 | #QPKG_SERVICE_PROGRAM_CHROOT=""
46 |
47 | # Location of icons for the packaged application.
48 | #QDK_DATA_DIR_ICONS="icons"
49 | # Location of files specific to arm-x09 packages.
50 | #QDK_DATA_DIR_X09="arm-x09"
51 | # Location of files specific to arm-x19 packages.
52 | #QDK_DATA_DIR_X19="arm-x19"
53 | # Location of files specific to x86 packages.
54 | #QDK_DATA_DIR_X86="x86"
55 | # Location of files specific to x86 (64-bit) packages.
56 | #QDK_DATA_DIR_X86_64="x86_64"
57 | # Location of files common to all architectures.
58 | #QDK_DATA_DIR_SHARED="shared"
59 | # Location of configuration files.
60 | #QDK_DATA_DIR_CONFIG="config"
61 | # Name of local data package.
62 | #QDK_DATA_FILE=""
63 | # Name of extra package (multiple definitions are allowed).
64 | #QDK_EXTRA_FILE=""
65 |
--------------------------------------------------------------------------------
/example/gitlab/qpkg.cfg:
--------------------------------------------------------------------------------
1 | # Name of the packaged application.
2 | QPKG_NAME="gitlab"
3 | QPKG_DISPLAYNAME="GitLab"
4 | # Version of the packaged application.
5 | QPKG_VER="8.16.6"
6 | # Author or maintainer of the package
7 | QPKG_AUTHOR="terrychen@qnap.com"
8 | # License for the packaged application
9 | #QPKG_LICENSE=""
10 | # One-line description of the packaged application
11 | QPKG_SUMMARY="GitLab includes Git repository management, code reviews, issue tracking, wikis, and more, plus GitLab CI, an easy-to-use continuous integration and deployment tool."
12 |
13 | # Preferred number in start/stop sequence.
14 | QPKG_RC_NUM="101"
15 | # Init-script used to control the start and stop of the installed application.
16 | QPKG_SERVICE_PROGRAM="gitlab.sh"
17 | QPKG_TIMEOUT="120,60"
18 |
19 | # Specifies any packages required for the current package to operate.
20 | QPKG_REQUIRE="container-station >= 1.7.2041"
21 | # Specifies what packages cannot be installed if the current package
22 | # is to operate properly.
23 | #QPKG_CONFLICT="Python, OPT/sed"
24 | # Name of configuration file (multiple definitions are allowed).
25 | #QPKG_CONFIG="myApp.conf"
26 | #QPKG_CONFIG="/etc/config/myApp.conf"
27 | # Port number used by service program.
28 | #QPKG_SERVICE_PORT=""
29 | # Location of file with running service's PID
30 | #QPKG_SERVICE_PIDFILE=""
31 | # Relative path to web interface
32 | QPKG_WEBUI="/gitlab/"
33 | # Port number for the web interface.
34 | QPKG_WEB_PORT="-1"
35 | # Select volume
36 | # 1: support installation
37 | # 2: support migration
38 | # 3 (1+2): support both installation and migration
39 | #QPKG_VOLUME_SELECT="0"
40 | QPKG_HEALTHY_CHECK_URL="/gitlab/"
41 | #QPKG_HEALTHY_CHECK_CMD=""
42 |
43 | # Location of the chroot environment (only TS-x09)
44 | #QPKG_ROOTFS=""
45 | # Init-script used to controls the start and stop of the
46 | # installed application (only TS-x09)
47 | #QPKG_SERVICE_PROGRAM_CHROOT=""
48 |
49 | # Location of icons for the packaged application.
50 | #QDK_DATA_DIR_ICONS="icons"
51 | # Location of files specific to arm-x09 packages.
52 | #QDK_DATA_DIR_X09="arm-x09"
53 | # Location of files specific to arm-x19 packages.
54 | #QDK_DATA_DIR_X19="arm-x19"
55 | # Location of files specific to x86 packages.
56 | #QDK_DATA_DIR_X86="x86"
57 | # Location of files specific to x86 (64-bit) packages.
58 | #QDK_DATA_DIR_X86_64="x86_64"
59 | # Location of files common to all architectures.
60 | #QDK_DATA_DIR_SHARED="shared"
61 | # Location of configuration files.
62 | #QDK_DATA_DIR_CONFIG="config"
63 | # Name of local data package.
64 | #QDK_DATA_FILE=""
65 | # Name of extra package (multiple definitions are allowed).
66 | #QDK_EXTRA_FILE=""
67 |
--------------------------------------------------------------------------------
/example/nginx/shared/nginx.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | QPKG_CONF=/etc/config/qpkg.conf
3 | QPKG_NAME=nginx
4 | QPKG_DISPLAY_NAME=$(/sbin/getcfg $QPKG_NAME Display_Name -f $QPKG_CONF)
5 | CONTAINER_STATION_DIR=$(/sbin/getcfg container-station Install_Path -f $QPKG_CONF)
6 | DOCKER=$CONTAINER_STATION_DIR/bin/system-docker
7 | JQ=$CONTAINER_STATION_DIR/usr/bin/jq
8 | QBUS=$CONTAINER_STATION_DIR/bin/qbus
9 | URI=com.qnap.dqpkg/qpkg/$QPKG_NAME
10 |
11 |
12 | . $CONTAINER_STATION_DIR/script/qpkg-functions
13 |
14 |
15 | wait_qcs_ready() {
16 | if ! which ${DOCKER} >/dev/null 2>&1; then
17 | # waiting for lxc
18 | TIMEOUT=10
19 | if qts_qpkg_is_enabled "container-station"; then
20 | local count=0
21 | while ! which lxc-start >/dev/null 2>&1; do
22 | sleep 1
23 | (( count++ ))
24 | [ $count -ge $TIMEOUT ] && break
25 | done
26 | fi
27 |
28 | if ! which ${DOCKER} >/dev/null 2>&1; then
29 | local msg="Container Station is not installed or enabled."
30 | if qts_find_parent_process $$ appRequest.cgi; then
31 | qts_log_error "$msg"
32 | qts_qpkg_disable $QPKG_NAME
33 | else
34 | echo "$msg"
35 | fi
36 | qts_error_exit
37 | fi
38 | fi
39 | }
40 |
41 | qbus_cmd() {
42 | # $1: command {start|stop}
43 | $QBUS put com.qnap.dqpkg/qpkg/${QPKG_NAME}/$1
44 | }
45 |
46 | complete_action() {
47 | # $1: expected states
48 | # $2: timeout
49 | echo "Wait \"$1\" state in $2 seconds"
50 | for ((i=0; i<=$2; i++)); do
51 | echo -n "."
52 | output=`QBUS_FORMAT=indent-json $QBUS get $URI`
53 | code=`echo $output | $JQ .code`
54 | state=`echo $output | $JQ .result.state | sed 's/\"//g'`
55 | progress=`echo $output | $JQ .result.progress`
56 | if [ "$code" != "200" ]; then
57 | echo "ERROR: get error response code: $code"
58 | break
59 | fi
60 | if echo "$1" | grep -q "$state"; then
61 | break
62 | fi
63 | sleep 1;
64 | done
65 | echo
66 | }
67 |
68 |
69 | case "$1" in
70 | start)
71 | if ! qts_qpkg_is_enabled $QPKG_NAME; then
72 | qts_error_exit "$QPKG_DISPLAY_NAME is disabled."
73 | fi
74 | wait_qcs_ready
75 | qbus_cmd start
76 | complete_action "configure installing installed starting running stopping stopped" 120
77 | ;;
78 |
79 | stop)
80 | qbus_cmd stop
81 | complete_action "stopped" 30
82 | ;;
83 |
84 | restart)
85 | $0 stop
86 | $0 start
87 | ;;
88 |
89 | remove)
90 | qbus_cmd remove
91 | complete_action "removed" 60
92 | ;;
93 | *)
94 | echo "Usage: $0 {start|stop|restart}"
95 | exit 1
96 | esac
97 |
98 | exit 0
99 |
--------------------------------------------------------------------------------
/example/nginx/package_routines:
--------------------------------------------------------------------------------
1 | ######################################################################
2 | # List of available definitions (it's not necessary to uncomment them)
3 | ######################################################################
4 | ###### Command definitions #####
5 | #CMD_AWK="/bin/awk"
6 | #CMD_CAT="/bin/cat"
7 | #CMD_CHMOD="/bin/chmod"
8 | #CMD_CHOWN="/bin/chown"
9 | #CMD_CP="/bin/cp"
10 | #CMD_CUT="/bin/cut"
11 | #CMD_DATE="/bin/date"
12 | #CMD_ECHO="/bin/echo"
13 | #CMD_EXPR="/usr/bin/expr"
14 | #CMD_FIND="/usr/bin/find"
15 | #CMD_GETCFG="/sbin/getcfg"
16 | #CMD_GREP="/bin/grep"
17 | #CMD_GZIP="/bin/gzip"
18 | #CMD_HOSTNAME="/bin/hostname"
19 | #CMD_LN="/bin/ln"
20 | #CMD_LOG_TOOL="/sbin/log_tool"
21 | #CMD_MD5SUM="/bin/md5sum"
22 | #CMD_MKDIR="/bin/mkdir"
23 | #CMD_MV="/bin/mv"
24 | #CMD_RM="/bin/rm"
25 | #CMD_RMDIR="/bin/rmdir"
26 | #CMD_SED="/bin/sed"
27 | #CMD_SETCFG="/sbin/setcfg"
28 | #CMD_SLEEP="/bin/sleep"
29 | #CMD_SORT="/usr/bin/sort"
30 | #CMD_SYNC="/bin/sync"
31 | #CMD_TAR="/bin/tar"
32 | #CMD_TOUCH="/bin/touch"
33 | #CMD_WGET="/usr/bin/wget"
34 | #CMD_WLOG="/sbin/write_log"
35 | #CMD_XARGS="/usr/bin/xargs"
36 | #CMD_7Z="/usr/local/sbin/7z"
37 | #
38 | ###### System definitions #####
39 | #SYS_EXTRACT_DIR="$(pwd)"
40 | #SYS_CONFIG_DIR="/etc/config"
41 | #SYS_INIT_DIR="/etc/init.d"
42 | #SYS_STARTUP_DIR="/etc/rcS.d"
43 | #SYS_SHUTDOWN_DIR="/etc/rcK.d"
44 | #SYS_RSS_IMG_DIR="/home/httpd/RSS/images"
45 | #SYS_QPKG_DATA_FILE_GZIP="./data.tar.gz"
46 | #SYS_QPKG_DATA_FILE_BZIP2="./data.tar.bz2"
47 | #SYS_QPKG_DATA_FILE_7ZIP="./data.tar.7z"
48 | #SYS_QPKG_DATA_CONFIG_FILE="./conf.tar.gz"
49 | #SYS_QPKG_DATA_MD5SUM_FILE="./md5sum"
50 | #SYS_QPKG_DATA_PACKAGES_FILE="./Packages.gz"
51 | #SYS_QPKG_CONFIG_FILE="$SYS_CONFIG_DIR/qpkg.conf"
52 | #SYS_QPKG_CONF_FIELD_QPKGFILE="QPKG_File"
53 | #SYS_QPKG_CONF_FIELD_NAME="Name"
54 | #SYS_QPKG_CONF_FIELD_VERSION="Version"
55 | #SYS_QPKG_CONF_FIELD_ENABLE="Enable"
56 | #SYS_QPKG_CONF_FIELD_DATE="Date"
57 | #SYS_QPKG_CONF_FIELD_SHELL="Shell"
58 | #SYS_QPKG_CONF_FIELD_INSTALL_PATH="Install_Path"
59 | #SYS_QPKG_CONF_FIELD_CONFIG_PATH="Config_Path"
60 | #SYS_QPKG_CONF_FIELD_WEBUI="WebUI"
61 | #SYS_QPKG_CONF_FIELD_WEBPORT="Web_Port"
62 | #SYS_QPKG_CONF_FIELD_SERVICEPORT="Service_Port"
63 | #SYS_QPKG_CONF_FIELD_SERVICE_PIDFILE="Pid_File"
64 | #SYS_QPKG_CONF_FIELD_AUTHOR="Author"
65 | #SYS_QPKG_CONF_FIELD_RC_NUMBER="RC_Number"
66 | ## The following variables are assigned values at run-time.
67 | #SYS_HOSTNAME=$($CMD_HOSTNAME)
68 | ## Data file name (one of SYS_QPKG_DATA_FILE_GZIP, SYS_QPKG_DATA_FILE_BZIP2,
69 | ## or SYS_QPKG_DATA_FILE_7ZIP)
70 | #SYS_QPKG_DATA_FILE=
71 | ## Base location.
72 | #SYS_QPKG_BASE=""
73 | ## Base location of QPKG installed packages.
74 | #SYS_QPKG_INSTALL_PATH=""
75 | ## Location of installed software.
76 | #SYS_QPKG_DIR=""
77 | ## If the QPKG should be enabled or disabled after the installation/upgrade.
78 | #SYS_QPKG_SERVICE_ENABLED=""
79 | ## Architecture of the device the QPKG is installed on.
80 | #SYS_CPU_ARCH=""
81 | ## Name and location of system shares
82 | #SYS_PUBLIC_SHARE=""
83 | #SYS_PUBLIC_PATH=""
84 | #SYS_DOWNLOAD_SHARE=""
85 | #SYS_DOWNLOAD_PATH=""
86 | #SYS_MULTIMEDIA_SHARE=""
87 | #SYS_MULTIMEDIA_PATH=""
88 | #SYS_RECORDINGS_SHARE=""
89 | #SYS_RECORDINGS_PATH=""
90 | #SYS_USB_SHARE=""
91 | #SYS_USB_PATH=""
92 | #SYS_WEB_SHARE=""
93 | #SYS_WEB_PATH=""
94 | ## Path to ipkg or opkg package tool if installed.
95 | #CMD_PKG_TOOL=
96 | #
97 | ######################################################################
98 | # All package specific functions shall call 'err_log MSG' if an error
99 | # is detected that shall terminate the installation.
100 | ######################################################################
101 | #
102 | ######################################################################
103 | # Define any package specific operations that shall be performed when
104 | # the package is removed.
105 | ######################################################################
106 | #PKG_PRE_REMOVE="{
107 | #}"
108 | #
109 | #PKG_MAIN_REMOVE="{
110 | #}"
111 | #
112 | #PKG_POST_REMOVE="{
113 | #}"
114 | #
115 | ######################################################################
116 | # Define any package specific initialization that shall be performed
117 | # before the package is installed.
118 | ######################################################################
119 | #pkg_init(){
120 | #}
121 | #
122 | ######################################################################
123 | # Define any package specific requirement checks that shall be
124 | # performed before the package is installed.
125 | ######################################################################
126 | #pkg_check_requirement(){
127 | #}
128 | #
129 | ######################################################################
130 | # Define any package specific operations that shall be performed when
131 | # the package is installed.
132 | ######################################################################
133 | #pkg_pre_install(){
134 | #}
135 | #
136 | #pkg_install(){
137 | #}
138 |
139 | pkg_post_install(){
140 | . qpkg.cfg
141 | QPKG_CONF=/etc/config/qpkg.conf
142 |
143 | DEPEND_ON=container-station
144 | /sbin/setcfg $QPKG_NAME depend_on "${DEPEND_ON}" -f $QPKG_CONF
145 | /sbin/setcfg $QPKG_NAME Timeout "${QPKG_TIMEOUT}" -f $QPKG_CONF
146 | [ -n "${QPKG_HEALTHY_CHECK_URL}" ] && \
147 | /sbin/setcfg $QPKG_NAME Healthy_Check_Url "${QPKG_HEALTHY_CHECK_URL}" -f $QPKG_CONF
148 | INSTALL_PATH=$(/sbin/getcfg ${QPKG_NAME} Install_Path -f $QPKG_CONF)
149 | }
150 |
--------------------------------------------------------------------------------
/example/gitlab/package_routines:
--------------------------------------------------------------------------------
1 | ######################################################################
2 | # List of available definitions (it's not necessary to uncomment them)
3 | ######################################################################
4 | ###### Command definitions #####
5 | #CMD_AWK="/bin/awk"
6 | #CMD_CAT="/bin/cat"
7 | #CMD_CHMOD="/bin/chmod"
8 | #CMD_CHOWN="/bin/chown"
9 | #CMD_CP="/bin/cp"
10 | #CMD_CUT="/bin/cut"
11 | #CMD_DATE="/bin/date"
12 | #CMD_ECHO="/bin/echo"
13 | #CMD_EXPR="/usr/bin/expr"
14 | #CMD_FIND="/usr/bin/find"
15 | #CMD_GETCFG="/sbin/getcfg"
16 | #CMD_GREP="/bin/grep"
17 | #CMD_GZIP="/bin/gzip"
18 | #CMD_HOSTNAME="/bin/hostname"
19 | #CMD_LN="/bin/ln"
20 | #CMD_LOG_TOOL="/sbin/log_tool"
21 | #CMD_MD5SUM="/bin/md5sum"
22 | #CMD_MKDIR="/bin/mkdir"
23 | #CMD_MV="/bin/mv"
24 | #CMD_RM="/bin/rm"
25 | #CMD_RMDIR="/bin/rmdir"
26 | #CMD_SED="/bin/sed"
27 | #CMD_SETCFG="/sbin/setcfg"
28 | #CMD_SLEEP="/bin/sleep"
29 | #CMD_SORT="/usr/bin/sort"
30 | #CMD_SYNC="/bin/sync"
31 | #CMD_TAR="/bin/tar"
32 | #CMD_TOUCH="/bin/touch"
33 | #CMD_WGET="/usr/bin/wget"
34 | #CMD_WLOG="/sbin/write_log"
35 | #CMD_XARGS="/usr/bin/xargs"
36 | #CMD_7Z="/usr/local/sbin/7z"
37 | #
38 | ###### System definitions #####
39 | #SYS_EXTRACT_DIR="$(pwd)"
40 | #SYS_CONFIG_DIR="/etc/config"
41 | #SYS_INIT_DIR="/etc/init.d"
42 | #SYS_STARTUP_DIR="/etc/rcS.d"
43 | #SYS_SHUTDOWN_DIR="/etc/rcK.d"
44 | #SYS_RSS_IMG_DIR="/home/httpd/RSS/images"
45 | #SYS_QPKG_DATA_FILE_GZIP="./data.tar.gz"
46 | #SYS_QPKG_DATA_FILE_BZIP2="./data.tar.bz2"
47 | #SYS_QPKG_DATA_FILE_7ZIP="./data.tar.7z"
48 | #SYS_QPKG_DATA_CONFIG_FILE="./conf.tar.gz"
49 | #SYS_QPKG_DATA_MD5SUM_FILE="./md5sum"
50 | #SYS_QPKG_DATA_PACKAGES_FILE="./Packages.gz"
51 | #SYS_QPKG_CONFIG_FILE="$SYS_CONFIG_DIR/qpkg.conf"
52 | #SYS_QPKG_CONF_FIELD_QPKGFILE="QPKG_File"
53 | #SYS_QPKG_CONF_FIELD_NAME="Name"
54 | #SYS_QPKG_CONF_FIELD_VERSION="Version"
55 | #SYS_QPKG_CONF_FIELD_ENABLE="Enable"
56 | #SYS_QPKG_CONF_FIELD_DATE="Date"
57 | #SYS_QPKG_CONF_FIELD_SHELL="Shell"
58 | #SYS_QPKG_CONF_FIELD_INSTALL_PATH="Install_Path"
59 | #SYS_QPKG_CONF_FIELD_CONFIG_PATH="Config_Path"
60 | #SYS_QPKG_CONF_FIELD_WEBUI="WebUI"
61 | #SYS_QPKG_CONF_FIELD_WEBPORT="Web_Port"
62 | #SYS_QPKG_CONF_FIELD_SERVICEPORT="Service_Port"
63 | #SYS_QPKG_CONF_FIELD_SERVICE_PIDFILE="Pid_File"
64 | #SYS_QPKG_CONF_FIELD_AUTHOR="Author"
65 | #SYS_QPKG_CONF_FIELD_RC_NUMBER="RC_Number"
66 | ## The following variables are assigned values at run-time.
67 | #SYS_HOSTNAME=$($CMD_HOSTNAME)
68 | ## Data file name (one of SYS_QPKG_DATA_FILE_GZIP, SYS_QPKG_DATA_FILE_BZIP2,
69 | ## or SYS_QPKG_DATA_FILE_7ZIP)
70 | #SYS_QPKG_DATA_FILE=
71 | ## Base location.
72 | #SYS_QPKG_BASE=""
73 | ## Base location of QPKG installed packages.
74 | #SYS_QPKG_INSTALL_PATH=""
75 | ## Location of installed software.
76 | #SYS_QPKG_DIR=""
77 | ## If the QPKG should be enabled or disabled after the installation/upgrade.
78 | #SYS_QPKG_SERVICE_ENABLED=""
79 | ## Architecture of the device the QPKG is installed on.
80 | #SYS_CPU_ARCH=""
81 | ## Name and location of system shares
82 | #SYS_PUBLIC_SHARE=""
83 | #SYS_PUBLIC_PATH=""
84 | #SYS_DOWNLOAD_SHARE=""
85 | #SYS_DOWNLOAD_PATH=""
86 | #SYS_MULTIMEDIA_SHARE=""
87 | #SYS_MULTIMEDIA_PATH=""
88 | #SYS_RECORDINGS_SHARE=""
89 | #SYS_RECORDINGS_PATH=""
90 | #SYS_USB_SHARE=""
91 | #SYS_USB_PATH=""
92 | #SYS_WEB_SHARE=""
93 | #SYS_WEB_PATH=""
94 | ## Path to ipkg or opkg package tool if installed.
95 | #CMD_PKG_TOOL=
96 | #
97 | ######################################################################
98 | # All package specific functions shall call 'err_log MSG' if an error
99 | # is detected that shall terminate the installation.
100 | ######################################################################
101 | #
102 | ######################################################################
103 | # Define any package specific operations that shall be performed when
104 | # the package is removed.
105 | ######################################################################
106 | #PKG_PRE_REMOVE="{
107 | #}"
108 | #
109 | #PKG_MAIN_REMOVE="{
110 | #}"
111 | #
112 | #PKG_POST_REMOVE="{
113 | #}"
114 | #
115 | ######################################################################
116 | # Define any package specific initialization that shall be performed
117 | # before the package is installed.
118 | ######################################################################
119 | #pkg_init(){
120 | #}
121 | #
122 | ######################################################################
123 | # Define any package specific requirement checks that shall be
124 | # performed before the package is installed.
125 | ######################################################################
126 | #pkg_check_requirement(){
127 | #}
128 | #
129 | ######################################################################
130 | # Define any package specific operations that shall be performed when
131 | # the package is installed.
132 | ######################################################################
133 | #pkg_pre_install(){
134 | #}
135 | #
136 | #pkg_install(){
137 | #}
138 |
139 | pkg_post_install(){
140 | . qpkg.cfg
141 | QPKG_CONF=/etc/config/qpkg.conf
142 |
143 | DEPEND_ON=container-station
144 | /sbin/setcfg $QPKG_NAME depend_on "${DEPEND_ON}" -f $QPKG_CONF
145 | /sbin/setcfg $QPKG_NAME Timeout "${QPKG_TIMEOUT}" -f $QPKG_CONF
146 | [ -n "${QPKG_HEALTHY_CHECK_URL}" ] && \
147 | /sbin/setcfg $QPKG_NAME Healthy_Check_Url "${QPKG_HEALTHY_CHECK_URL}" -f $QPKG_CONF
148 | [ -n "${QPKG_HEALTHY_CHECK_CMD}" ] && \
149 | /sbin/setcfg $QPKG_NAME Healthy_Check_Cmd "${QPKG_HEALTHY_CHECK_CMD}" -f $QPKG_CONF
150 | INSTALL_PATH=$(/sbin/getcfg ${QPKG_NAME} Install_Path -f $QPKG_CONF)
151 | }
152 |
--------------------------------------------------------------------------------
/example/joomla/package_routines:
--------------------------------------------------------------------------------
1 | ######################################################################
2 | # List of available definitions (it's not necessary to uncomment them)
3 | ######################################################################
4 | ###### Command definitions #####
5 | #CMD_AWK="/bin/awk"
6 | #CMD_CAT="/bin/cat"
7 | #CMD_CHMOD="/bin/chmod"
8 | #CMD_CHOWN="/bin/chown"
9 | #CMD_CP="/bin/cp"
10 | #CMD_CUT="/bin/cut"
11 | #CMD_DATE="/bin/date"
12 | #CMD_ECHO="/bin/echo"
13 | #CMD_EXPR="/usr/bin/expr"
14 | #CMD_FIND="/usr/bin/find"
15 | #CMD_GETCFG="/sbin/getcfg"
16 | #CMD_GREP="/bin/grep"
17 | #CMD_GZIP="/bin/gzip"
18 | #CMD_HOSTNAME="/bin/hostname"
19 | #CMD_LN="/bin/ln"
20 | #CMD_LOG_TOOL="/sbin/log_tool"
21 | #CMD_MD5SUM="/bin/md5sum"
22 | #CMD_MKDIR="/bin/mkdir"
23 | #CMD_MV="/bin/mv"
24 | #CMD_RM="/bin/rm"
25 | #CMD_RMDIR="/bin/rmdir"
26 | #CMD_SED="/bin/sed"
27 | #CMD_SETCFG="/sbin/setcfg"
28 | #CMD_SLEEP="/bin/sleep"
29 | #CMD_SORT="/usr/bin/sort"
30 | #CMD_SYNC="/bin/sync"
31 | #CMD_TAR="/bin/tar"
32 | #CMD_TOUCH="/bin/touch"
33 | #CMD_WGET="/usr/bin/wget"
34 | #CMD_WLOG="/sbin/write_log"
35 | #CMD_XARGS="/usr/bin/xargs"
36 | #CMD_7Z="/usr/local/sbin/7z"
37 | #
38 | ###### System definitions #####
39 | #SYS_EXTRACT_DIR="$(pwd)"
40 | #SYS_CONFIG_DIR="/etc/config"
41 | #SYS_INIT_DIR="/etc/init.d"
42 | #SYS_STARTUP_DIR="/etc/rcS.d"
43 | #SYS_SHUTDOWN_DIR="/etc/rcK.d"
44 | #SYS_RSS_IMG_DIR="/home/httpd/RSS/images"
45 | #SYS_QPKG_DATA_FILE_GZIP="./data.tar.gz"
46 | #SYS_QPKG_DATA_FILE_BZIP2="./data.tar.bz2"
47 | #SYS_QPKG_DATA_FILE_7ZIP="./data.tar.7z"
48 | #SYS_QPKG_DATA_CONFIG_FILE="./conf.tar.gz"
49 | #SYS_QPKG_DATA_MD5SUM_FILE="./md5sum"
50 | #SYS_QPKG_DATA_PACKAGES_FILE="./Packages.gz"
51 | #SYS_QPKG_CONFIG_FILE="$SYS_CONFIG_DIR/qpkg.conf"
52 | #SYS_QPKG_CONF_FIELD_QPKGFILE="QPKG_File"
53 | #SYS_QPKG_CONF_FIELD_NAME="Name"
54 | #SYS_QPKG_CONF_FIELD_VERSION="Version"
55 | #SYS_QPKG_CONF_FIELD_ENABLE="Enable"
56 | #SYS_QPKG_CONF_FIELD_DATE="Date"
57 | #SYS_QPKG_CONF_FIELD_SHELL="Shell"
58 | #SYS_QPKG_CONF_FIELD_INSTALL_PATH="Install_Path"
59 | #SYS_QPKG_CONF_FIELD_CONFIG_PATH="Config_Path"
60 | #SYS_QPKG_CONF_FIELD_WEBUI="WebUI"
61 | #SYS_QPKG_CONF_FIELD_WEBPORT="Web_Port"
62 | #SYS_QPKG_CONF_FIELD_SERVICEPORT="Service_Port"
63 | #SYS_QPKG_CONF_FIELD_SERVICE_PIDFILE="Pid_File"
64 | #SYS_QPKG_CONF_FIELD_AUTHOR="Author"
65 | #SYS_QPKG_CONF_FIELD_RC_NUMBER="RC_Number"
66 | ## The following variables are assigned values at run-time.
67 | #SYS_HOSTNAME=$($CMD_HOSTNAME)
68 | ## Data file name (one of SYS_QPKG_DATA_FILE_GZIP, SYS_QPKG_DATA_FILE_BZIP2,
69 | ## or SYS_QPKG_DATA_FILE_7ZIP)
70 | #SYS_QPKG_DATA_FILE=
71 | ## Base location.
72 | #SYS_QPKG_BASE=""
73 | ## Base location of QPKG installed packages.
74 | #SYS_QPKG_INSTALL_PATH=""
75 | ## Location of installed software.
76 | #SYS_QPKG_DIR=""
77 | ## If the QPKG should be enabled or disabled after the installation/upgrade.
78 | #SYS_QPKG_SERVICE_ENABLED=""
79 | ## Architecture of the device the QPKG is installed on.
80 | #SYS_CPU_ARCH=""
81 | ## Name and location of system shares
82 | #SYS_PUBLIC_SHARE=""
83 | #SYS_PUBLIC_PATH=""
84 | #SYS_DOWNLOAD_SHARE=""
85 | #SYS_DOWNLOAD_PATH=""
86 | #SYS_MULTIMEDIA_SHARE=""
87 | #SYS_MULTIMEDIA_PATH=""
88 | #SYS_RECORDINGS_SHARE=""
89 | #SYS_RECORDINGS_PATH=""
90 | #SYS_USB_SHARE=""
91 | #SYS_USB_PATH=""
92 | #SYS_WEB_SHARE=""
93 | #SYS_WEB_PATH=""
94 | ## Path to ipkg or opkg package tool if installed.
95 | #CMD_PKG_TOOL=
96 | #
97 | ######################################################################
98 | # All package specific functions shall call 'err_log MSG' if an error
99 | # is detected that shall terminate the installation.
100 | ######################################################################
101 | #
102 | ######################################################################
103 | # Define any package specific operations that shall be performed when
104 | # the package is removed.
105 | ######################################################################
106 | #PKG_PRE_REMOVE="{
107 | #}"
108 | #
109 | #PKG_MAIN_REMOVE="{
110 | #}"
111 | #
112 | #PKG_POST_REMOVE="{
113 | #}"
114 | #
115 | ######################################################################
116 | # Define any package specific initialization that shall be performed
117 | # before the package is installed.
118 | ######################################################################
119 | #pkg_init(){
120 | #}
121 | #
122 | ######################################################################
123 | # Define any package specific requirement checks that shall be
124 | # performed before the package is installed.
125 | ######################################################################
126 | #pkg_check_requirement(){
127 | #}
128 | #
129 | ######################################################################
130 | # Define any package specific operations that shall be performed when
131 | # the package is installed.
132 | ######################################################################
133 | #pkg_pre_install(){
134 | #}
135 | #
136 | #pkg_install(){
137 | #}
138 |
139 | pkg_post_install(){
140 | QPKG_CONF=/etc/config/qpkg.conf
141 | QPKG_VERSION=$(/sbin/getcfg $QPKG_NAME Version -f $QPKG_CONF)
142 | CONTAINER_STATION=$(/sbin/getcfg container-station Install_Path -f $QPKG_CONF)
143 |
144 | DEPEND_ON=container-station
145 | /sbin/setcfg $QPKG_NAME depend_on "${DEPEND_ON}" -f /etc/config/qpkg.conf
146 | /sbin/setcfg $QPKG_NAME Timeout "120,60" -f /etc/config/qpkg.conf
147 |
148 | /sbin/log_tool -t0 -uSystem -p127.0.0.1 -mlocalhost -a "[$QPKG_NAME] Start installation"
149 | $CONTAINER_STATION/bin/qbus post com.qnap.dqpkg/qpkg '{"qpkg": "'$QPKG_NAME'", "action": "install"}'
150 | }
151 |
--------------------------------------------------------------------------------
/example/redmine/package_routines:
--------------------------------------------------------------------------------
1 | ######################################################################
2 | # List of available definitions (it's not necessary to uncomment them)
3 | ######################################################################
4 | ###### Command definitions #####
5 | #CMD_AWK="/bin/awk"
6 | #CMD_CAT="/bin/cat"
7 | #CMD_CHMOD="/bin/chmod"
8 | #CMD_CHOWN="/bin/chown"
9 | #CMD_CP="/bin/cp"
10 | #CMD_CUT="/bin/cut"
11 | #CMD_DATE="/bin/date"
12 | #CMD_ECHO="/bin/echo"
13 | #CMD_EXPR="/usr/bin/expr"
14 | #CMD_FIND="/usr/bin/find"
15 | #CMD_GETCFG="/sbin/getcfg"
16 | #CMD_GREP="/bin/grep"
17 | #CMD_GZIP="/bin/gzip"
18 | #CMD_HOSTNAME="/bin/hostname"
19 | #CMD_LN="/bin/ln"
20 | #CMD_LOG_TOOL="/sbin/log_tool"
21 | #CMD_MD5SUM="/bin/md5sum"
22 | #CMD_MKDIR="/bin/mkdir"
23 | #CMD_MV="/bin/mv"
24 | #CMD_RM="/bin/rm"
25 | #CMD_RMDIR="/bin/rmdir"
26 | #CMD_SED="/bin/sed"
27 | #CMD_SETCFG="/sbin/setcfg"
28 | #CMD_SLEEP="/bin/sleep"
29 | #CMD_SORT="/usr/bin/sort"
30 | #CMD_SYNC="/bin/sync"
31 | #CMD_TAR="/bin/tar"
32 | #CMD_TOUCH="/bin/touch"
33 | #CMD_WGET="/usr/bin/wget"
34 | #CMD_WLOG="/sbin/write_log"
35 | #CMD_XARGS="/usr/bin/xargs"
36 | #CMD_7Z="/usr/local/sbin/7z"
37 | #
38 | ###### System definitions #####
39 | #SYS_EXTRACT_DIR="$(pwd)"
40 | #SYS_CONFIG_DIR="/etc/config"
41 | #SYS_INIT_DIR="/etc/init.d"
42 | #SYS_STARTUP_DIR="/etc/rcS.d"
43 | #SYS_SHUTDOWN_DIR="/etc/rcK.d"
44 | #SYS_RSS_IMG_DIR="/home/httpd/RSS/images"
45 | #SYS_QPKG_DATA_FILE_GZIP="./data.tar.gz"
46 | #SYS_QPKG_DATA_FILE_BZIP2="./data.tar.bz2"
47 | #SYS_QPKG_DATA_FILE_7ZIP="./data.tar.7z"
48 | #SYS_QPKG_DATA_CONFIG_FILE="./conf.tar.gz"
49 | #SYS_QPKG_DATA_MD5SUM_FILE="./md5sum"
50 | #SYS_QPKG_DATA_PACKAGES_FILE="./Packages.gz"
51 | #SYS_QPKG_CONFIG_FILE="$SYS_CONFIG_DIR/qpkg.conf"
52 | #SYS_QPKG_CONF_FIELD_QPKGFILE="QPKG_File"
53 | #SYS_QPKG_CONF_FIELD_NAME="Name"
54 | #SYS_QPKG_CONF_FIELD_VERSION="Version"
55 | #SYS_QPKG_CONF_FIELD_ENABLE="Enable"
56 | #SYS_QPKG_CONF_FIELD_DATE="Date"
57 | #SYS_QPKG_CONF_FIELD_SHELL="Shell"
58 | #SYS_QPKG_CONF_FIELD_INSTALL_PATH="Install_Path"
59 | #SYS_QPKG_CONF_FIELD_CONFIG_PATH="Config_Path"
60 | #SYS_QPKG_CONF_FIELD_WEBUI="WebUI"
61 | #SYS_QPKG_CONF_FIELD_WEBPORT="Web_Port"
62 | #SYS_QPKG_CONF_FIELD_SERVICEPORT="Service_Port"
63 | #SYS_QPKG_CONF_FIELD_SERVICE_PIDFILE="Pid_File"
64 | #SYS_QPKG_CONF_FIELD_AUTHOR="Author"
65 | #SYS_QPKG_CONF_FIELD_RC_NUMBER="RC_Number"
66 | ## The following variables are assigned values at run-time.
67 | #SYS_HOSTNAME=$($CMD_HOSTNAME)
68 | ## Data file name (one of SYS_QPKG_DATA_FILE_GZIP, SYS_QPKG_DATA_FILE_BZIP2,
69 | ## or SYS_QPKG_DATA_FILE_7ZIP)
70 | #SYS_QPKG_DATA_FILE=
71 | ## Base location.
72 | #SYS_QPKG_BASE=""
73 | ## Base location of QPKG installed packages.
74 | #SYS_QPKG_INSTALL_PATH=""
75 | ## Location of installed software.
76 | #SYS_QPKG_DIR=""
77 | ## If the QPKG should be enabled or disabled after the installation/upgrade.
78 | #SYS_QPKG_SERVICE_ENABLED=""
79 | ## Architecture of the device the QPKG is installed on.
80 | #SYS_CPU_ARCH=""
81 | ## Name and location of system shares
82 | #SYS_PUBLIC_SHARE=""
83 | #SYS_PUBLIC_PATH=""
84 | #SYS_DOWNLOAD_SHARE=""
85 | #SYS_DOWNLOAD_PATH=""
86 | #SYS_MULTIMEDIA_SHARE=""
87 | #SYS_MULTIMEDIA_PATH=""
88 | #SYS_RECORDINGS_SHARE=""
89 | #SYS_RECORDINGS_PATH=""
90 | #SYS_USB_SHARE=""
91 | #SYS_USB_PATH=""
92 | #SYS_WEB_SHARE=""
93 | #SYS_WEB_PATH=""
94 | ## Path to ipkg or opkg package tool if installed.
95 | #CMD_PKG_TOOL=
96 | #
97 | ######################################################################
98 | # All package specific functions shall call 'err_log MSG' if an error
99 | # is detected that shall terminate the installation.
100 | ######################################################################
101 | #
102 | ######################################################################
103 | # Define any package specific operations that shall be performed when
104 | # the package is removed.
105 | ######################################################################
106 | #PKG_PRE_REMOVE="{
107 | #}"
108 | #
109 | #PKG_MAIN_REMOVE="{
110 | #}"
111 | #
112 | #PKG_POST_REMOVE="{
113 | #}"
114 | #
115 | ######################################################################
116 | # Define any package specific initialization that shall be performed
117 | # before the package is installed.
118 | ######################################################################
119 | #pkg_init(){
120 | #}
121 | #
122 | ######################################################################
123 | # Define any package specific requirement checks that shall be
124 | # performed before the package is installed.
125 | ######################################################################
126 | #pkg_check_requirement(){
127 | #}
128 | #
129 | ######################################################################
130 | # Define any package specific operations that shall be performed when
131 | # the package is installed.
132 | ######################################################################
133 | #pkg_pre_install(){
134 | #}
135 | #
136 | #pkg_install(){
137 | #}
138 |
139 | pkg_post_install(){
140 | QPKG_CONF=/etc/config/qpkg.conf
141 | QPKG_VERSION=$(/sbin/getcfg $QPKG_NAME Version -f $QPKG_CONF)
142 | CONTAINER_STATION=$(/sbin/getcfg container-station Install_Path -f $QPKG_CONF)
143 |
144 | DEPEND_ON=container-station
145 | /sbin/setcfg $QPKG_NAME depend_on "${DEPEND_ON}" -f /etc/config/qpkg.conf
146 | /sbin/setcfg $QPKG_NAME Timeout "120,60" -f /etc/config/qpkg.conf
147 |
148 | /sbin/log_tool -t0 -uSystem -p127.0.0.1 -mlocalhost -a "[$QPKG_NAME] Start installation"
149 | $CONTAINER_STATION/bin/qbus post com.qnap.dqpkg/qpkg '{"qpkg": "'$QPKG_NAME'", "action": "install"}'
150 | }
151 |
--------------------------------------------------------------------------------
/example/gitlab/shared/wizard/install.json:
--------------------------------------------------------------------------------
1 | {
2 | "api_version": "v1",
3 | "title": "{{GITLAB_NAME}}",
4 | "wizard": [
5 | {
6 | "title": "{{GITLAB_BASE_PAGE}}",
7 | "schema": {
8 | "hostname": {
9 | "title": "{{GITLAB_HOST}}",
10 | "type": "string",
11 | "pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$",
12 | "description": "{{GITLAB_HOST_DESC}}",
13 | "validationMessage": "{{GITLAB_HOST_MSG}}",
14 | "required": false
15 | },
16 | "http_port": {
17 | "title": "HTTP Port",
18 | "type": "integer",
19 | "description": "{{GITLAB_WEB_HOST_PORT_DESC}}",
20 | "minimum": 1,
21 | "maximum": 65535,
22 | "required": true
23 | },
24 | "ssh_port": {
25 | "title": "SSH Port",
26 | "type": "integer",
27 | "description": "{{GITLAB_SSH_HOST_PORT_DESC}}",
28 | "minimum": 1,
29 | "maximum": 65535,
30 | "required": true
31 | },
32 | "root_email": {
33 | "title": "{{GITLAB_ROOT_EMAIL}}",
34 | "type": "string",
35 | "pattern": "^\\S+@\\S+\\.\\S+$",
36 | "description": "{{GITLAB_ROOT_EMAIL_DESC}}",
37 | "validationMessage": "{{GITLAB_ROOT_EMAIL_MSG}}",
38 | "required": false
39 | }
40 | },
41 | "form": [
42 | {
43 | "key": "hostname",
44 | "placeholder": "localhost"
45 | },
46 | "http_port",
47 | "ssh_port",
48 | "root_email"
49 | ]
50 | },
51 | {
52 | "title": "{{GITLAB_SMTP_PAGE}}",
53 | "schema": {
54 | "smtp_enabled": {
55 | "title": "{{GITLAB_SMTP_ENABLED}}",
56 | "type": "boolean",
57 | "description": "{{GITLAB_SMTP_ENABLED_DESC}}",
58 | "required": true
59 | },
60 | "smtp_host": {
61 | "title": "{{GITLAB_SMTP_HOST}}",
62 | "type": "string",
63 | "description": "{{GITLAB_SMTP_HOST_DESC}}",
64 | "required": true
65 | },
66 | "smtp_port": {
67 | "title": "{{GITLAB_SMTP_PORT}}",
68 | "type": "integer",
69 | "description": "{{GITLAB_SMTP_PORT_DESC}}",
70 | "minimum": 1,
71 | "maximum": 65535,
72 | "required": true
73 | },
74 | "smtp_user": {
75 | "title": "{{GITLAB_SMTP_USER}}",
76 | "type": "string",
77 | "description": "{{GITLAB_SMTP_USER_DESC}}"
78 | },
79 | "smtp_pass": {
80 | "title": "{{GITLAB_SMTP_PASS}}",
81 | "type": "string",
82 | "description": "{{GITLAB_SMTP_PASS_DESC}}"
83 | },
84 | "smtp_tls": {
85 | "title": "{{GITLAB_SMTP_TLS}}",
86 | "type": "boolean",
87 | "description": "{{GITLAB_SMTP_TLS_DESC}}",
88 | "required": true
89 | }
90 | },
91 | "form": [
92 | {
93 | "key": "smtp_enabled",
94 | "labelHtmlClass": "hide"
95 | },
96 | {
97 | "key": "smtp_host",
98 | "condition": "model.smtp_enabled"
99 | },
100 | {
101 | "key": "smtp_port",
102 | "condition": "model.smtp_enabled"
103 | },
104 | {
105 | "key": "smtp_user",
106 | "condition": "model.smtp_enabled"
107 | },
108 | {
109 | "key": "smtp_pass",
110 | "type": "password",
111 | "condition": "model.smtp_enabled"
112 | }
113 | ]
114 | },
115 | {
116 | "title": "{{GITLAB_LDAP_PAGE}}",
117 | "schema": {
118 | "ldap_enabled": {
119 | "title": "{{GITLAB_LDAP_ENABLED}}",
120 | "type": "boolean",
121 | "description": "{{GITLAB_LDAP_ENABLED_DESC}}",
122 | "required": true
123 | },
124 | "ldap_label": {
125 | "title": "{{GITLAB_LDAP_LABEL}}",
126 | "type": "string",
127 | "description": "{{GITLAB_LDAP_LABEL_DESC}}",
128 | "required": true
129 | },
130 | "ldap_host": {
131 | "title": "{{GITLAB_LDAP_HOST}}",
132 | "type": "string",
133 | "description": "{{GITLAB_LDAP_HOST_DESC}}",
134 | "required": true
135 | },
136 | "ldap_port": {
137 | "title": "{{GITLAB_LDAP_PORT}}",
138 | "type": "integer",
139 | "description": "{{GITLAB_LDAP_PORT_DESC}}",
140 | "minimum": 1,
141 | "maximum": 65535,
142 | "required": true
143 | },
144 | "ldap_bind_dn": {
145 | "title": "{{GITLAB_LDAP_BIND_DN}}",
146 | "type": "string",
147 | "description": "{{GITLAB_LDAP_BIND_DN_DESC}}",
148 | "required": true
149 | },
150 | "ldap_pass": {
151 | "title": "{{GITLAB_LDAP_PASS}}",
152 | "type": "string",
153 | "description": "{{GITLAB_LDAP_PASS_DESC}}",
154 | "required": true
155 | },
156 | "ldap_base": {
157 | "title": "{{GITLAB_LDAP_BASE}}",
158 | "type": "string",
159 | "description": "{{GITLAB_LDAP_BASE_DESC}}",
160 | "required": true
161 | }
162 | },
163 | "form": [
164 | {
165 | "key": "ldap_enabled",
166 | "labelHtmlClass": "hide"
167 | },
168 | {
169 | "key": "ldap_label",
170 | "condition": "model.ldap_enabled"
171 | },
172 | {
173 | "key": "ldap_host",
174 | "condition": "model.ldap_enabled"
175 | },
176 | {
177 | "key": "ldap_port",
178 | "condition": "model.ldap_enabled"
179 | },
180 | {
181 | "key": "ldap_bind_dn",
182 | "condition": "model.ldap_enabled"
183 | },
184 | {
185 | "key": "ldap_pass",
186 | "type": "password",
187 | "condition": "model.ldap_enabled"
188 | },
189 | {
190 | "key": "ldap_base",
191 | "condition": "model.ldap_enabled"
192 | }
193 | ]
194 | }
195 | ],
196 | "binding": {
197 | "type": "yaml",
198 | "file": "docker-compose.yml",
199 | "data": {
200 | "hostname": "services.gitlab.environment.GITLAB_HOST",
201 | "http_port": [
202 | "services.gitlab.ports[0]",
203 | "services.gitlab.environment.GITLAB_PORT"
204 | ],
205 | "ssh_port": [
206 | "services.gitlab.environment.GITLAB_SSH_PORT",
207 | "services.gitlab.ports[1]"
208 | ],
209 | "root_email": "services.gitlab.environment.GITLAB_ROOT_EMAIL",
210 | "smtp_enabled": "services.gitlab.environment.SMTP_ENABLED",
211 | "smtp_host": "services.gitlab.environment.SMTP_HOST",
212 | "smtp_port": "services.gitlab.environment.SMTP_PORT",
213 | "smtp_user": "services.gitlab.environment.SMTP_USER",
214 | "smtp_pass": "services.gitlab.environment.SMTP_PASS",
215 | "smtp_tls": "services.gitlab.environment.SMTP_TLS",
216 | "ldap_enabled": "services.gitlab.environment.LDAP_ENABLED",
217 | "ldap_label": "services.gitlab.environment.LDAP_LABEL",
218 | "ldap_host": "services.gitlab.environment.LDAP_HOST",
219 | "ldap_port": "services.gitlab.environment.LDAP_PORT",
220 | "ldap_bind_dn": "services.gitlab.environment.LDAP_BIND_DN",
221 | "ldap_pass": "services.gitlab.environment.LDAP_PASS",
222 | "ldap_base": "services.gitlab.environment.LDAP_BASE"
223 | },
224 | "template": ["*.tpl"]
225 | }
226 | }
227 |
--------------------------------------------------------------------------------