mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2025-01-27 14:07:56 +03:00
ansible image generator (wip) + new apache2 and php
This commit is contained in:
parent
7873dbf295
commit
cea4133b47
32
.github/workflows/epicmorg.base.images.web.yml
vendored
32
.github/workflows/epicmorg.base.images.web.yml
vendored
@ -21,8 +21,14 @@ jobs:
|
|||||||
- name: Test Make
|
- name: Test Make
|
||||||
run: make
|
run: make
|
||||||
|
|
||||||
- name: "Build and Deploy PHP Latest Image:"
|
# - name: "Build and Deploy PHP Latest Image:"
|
||||||
run: cd linux/ecosystem/php/latest && pwd && make build && make deploy
|
# run: cd linux/ecosystem/php/latest && pwd && make build && make deploy
|
||||||
|
|
||||||
|
- name: "Build and Deploy PHP 7.0 Image:"
|
||||||
|
run: cd linux/ecosystem/php/php7.0 && pwd && make build && make deploy
|
||||||
|
|
||||||
|
- name: "Build and Deploy PHP 7.1 Image:"
|
||||||
|
run: cd linux/ecosystem/php/php7.1 && pwd && make build && make deploy
|
||||||
|
|
||||||
- name: "Build and Deploy PHP 7.2 Image:"
|
- name: "Build and Deploy PHP 7.2 Image:"
|
||||||
run: cd linux/ecosystem/php/php7.2 && pwd && make build && make deploy
|
run: cd linux/ecosystem/php/php7.2 && pwd && make build && make deploy
|
||||||
@ -39,6 +45,12 @@ jobs:
|
|||||||
- name: "Build and Deploy PHP 8.1 Image:"
|
- name: "Build and Deploy PHP 8.1 Image:"
|
||||||
run: cd linux/ecosystem/php/php8.1 && pwd && make build && make deploy
|
run: cd linux/ecosystem/php/php8.1 && pwd && make build && make deploy
|
||||||
|
|
||||||
|
- name: "Build and Deploy PHP 8.2 Image:"
|
||||||
|
run: cd linux/ecosystem/php/php8.2 && pwd && make build && make deploy
|
||||||
|
|
||||||
|
- name: "Build and Deploy PHP 8.3 Image:"
|
||||||
|
run: cd linux/ecosystem/php/php8.3 && pwd && make build && make deploy
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
|
|
||||||
build-apache2-images:
|
build-apache2-images:
|
||||||
@ -54,8 +66,14 @@ jobs:
|
|||||||
- name: Test Make
|
- name: Test Make
|
||||||
run: make
|
run: make
|
||||||
|
|
||||||
- name: "Build and Deploy Apache 2 Latest Image:"
|
# - name: "Build and Deploy Apache 2 Latest Image:"
|
||||||
run: cd linux/ecosystem/apache2/latest && pwd && make build && make deploy
|
# run: cd linux/ecosystem/apache2/latest && pwd && make build && make deploy
|
||||||
|
|
||||||
|
- name: "Build and Deploy Apache 2 + PHP 7.0 Image:"
|
||||||
|
run: cd linux/ecosystem/apache2/php7.0 && pwd && make build && make deploy
|
||||||
|
|
||||||
|
- name: "Build and Deploy Apache 2 + PHP 7.1 Image:"
|
||||||
|
run: cd linux/ecosystem/apache2/php7.1 && pwd && make build && make deploy
|
||||||
|
|
||||||
- name: "Build and Deploy Apache 2 + PHP 7.2 Image:"
|
- name: "Build and Deploy Apache 2 + PHP 7.2 Image:"
|
||||||
run: cd linux/ecosystem/apache2/php7.2 && pwd && make build && make deploy
|
run: cd linux/ecosystem/apache2/php7.2 && pwd && make build && make deploy
|
||||||
@ -72,6 +90,12 @@ jobs:
|
|||||||
- name: "Build and Deploy Apache 2 + PHP 8.1 Image:"
|
- name: "Build and Deploy Apache 2 + PHP 8.1 Image:"
|
||||||
run: cd linux/ecosystem/apache2/php8.1 && pwd && make build && make deploy
|
run: cd linux/ecosystem/apache2/php8.1 && pwd && make build && make deploy
|
||||||
|
|
||||||
|
- name: "Build and Deploy Apache 2 + PHP 8.2 Image:"
|
||||||
|
run: cd linux/ecosystem/apache2/php8.2 && pwd && make build && make deploy
|
||||||
|
|
||||||
|
- name: "Build and Deploy Apache 2 + PHP 8.3 Image:"
|
||||||
|
run: cd linux/ecosystem/apache2/php8.3 && pwd && make build && make deploy
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
|
|
||||||
build-nginx-images:
|
build-nginx-images:
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
# Temp make file for local builds and debug
|
# Temp make file for local builds and debug
|
||||||
Makefile.temp
|
Makefile.temp
|
||||||
|
# debug ansible file
|
||||||
|
output.log
|
||||||
|
11
CHANGELOG.md
11
CHANGELOG.md
@ -6,6 +6,17 @@
|
|||||||
* added `jdk17` support.
|
* added `jdk17` support.
|
||||||
* added `freegpt` webui by [Em1tSan/freegpt-webui-ru](https://github.com/Em1tSan/freegpt-webui-ru).
|
* added `freegpt` webui by [Em1tSan/freegpt-webui-ru](https://github.com/Em1tSan/freegpt-webui-ru).
|
||||||
* updated `atlassian` images
|
* updated `atlassian` images
|
||||||
|
* updated `testrail` images
|
||||||
|
* added reworked `php5.5` iamge.
|
||||||
|
* added reworked `php7.0` + `apache2` images with `cassandra`, `ioncube` and `bolt` support.
|
||||||
|
* added reworked `php7.1` + `apache2` images with `cassandra`, `ioncube` and `bolt` support.
|
||||||
|
* updated reworked `php7.2` + `apache2` images with `cassandra`, `ioncube` and `bolt` support.
|
||||||
|
* updated reworked `php7.3` + `apache2` images with `cassandra`, `ioncube` and `bolt` support.
|
||||||
|
* updated reworked `php7.4` + `apache2` images with `cassandra`, `ioncube` and `bolt` support.
|
||||||
|
* updated reworked `php8.0` + `apache2` images with `cassandra`, `ioncube` and `bolt` support.
|
||||||
|
* updated reworked `php8.1` + `apache2` images with `cassandra`, `ioncube` and `bolt` support.
|
||||||
|
* added reworked `php8.2` + `apache2` images with `cassandra`, `ioncube` and `bolt` support.
|
||||||
|
* added reworked `php8.3` + `apache2` images with `cassandra`, `ioncube` and `bolt` support.
|
||||||
* `may-june`
|
* `may-june`
|
||||||
* `base` images improved
|
* `base` images improved
|
||||||
* `nginx` images updated
|
* `nginx` images updated
|
||||||
|
10
Makefile
10
Makefile
@ -351,20 +351,26 @@ ecosystem-debian-bookworm-images:
|
|||||||
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk18 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk18 && pwd && make build && make deploy
|
||||||
|
|
||||||
ecosystem-php-images:
|
ecosystem-php-images:
|
||||||
cd `pwd`/linux/ecosystem/php/latest && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/php/php7.0 && pwd && make build && make deploy
|
||||||
|
cd `pwd`/linux/ecosystem/php/php7.1 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/php/php7.2 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/php/php7.2 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/php/php7.3 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/php/php7.3 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/php/php7.4 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/php/php7.4 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/php/php8.0 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/php/php8.0 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/php/php8.1 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/php/php8.1 && pwd && make build && make deploy
|
||||||
|
cd `pwd`/linux/ecosystem/php/php8.2 && pwd && make build && make deploy
|
||||||
|
cd `pwd`/linux/ecosystem/php/php8.3 && pwd && make build && make deploy
|
||||||
|
|
||||||
ecosystem-apache2-images:
|
ecosystem-apache2-images:
|
||||||
cd `pwd`/linux/ecosystem/apache2/latest && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/apache2/php7.0 && pwd && make build && make deploy
|
||||||
|
cd `pwd`/linux/ecosystem/apache2/php7.1 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/apache2/php7.2 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/apache2/php7.2 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/apache2/php7.3 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/apache2/php7.3 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/apache2/php7.4 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/apache2/php7.4 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/apache2/php8.0 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/apache2/php8.0 && pwd && make build && make deploy
|
||||||
cd `pwd`/linux/ecosystem/apache2/php8.1 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/apache2/php8.1 && pwd && make build && make deploy
|
||||||
|
cd `pwd`/linux/ecosystem/apache2/php8.2 && pwd && make build && make deploy
|
||||||
|
cd `pwd`/linux/ecosystem/apache2/php8.3 && pwd && make build && make deploy
|
||||||
|
|
||||||
ecosystem-testrail-images:
|
ecosystem-testrail-images:
|
||||||
cd `pwd`/linux/ecosystem/cassandra/3.11 && pwd && make build && make deploy
|
cd `pwd`/linux/ecosystem/cassandra/3.11 && pwd && make build && make deploy
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
ansible_python_interpreter = /usr/bin/python3
|
ansible_python_interpreter = /usr/bin/python3
|
||||||
#inventory = inventory/hosts
|
inventory = inventory/hosts
|
||||||
any_errors_fatal = true
|
any_errors_fatal = true
|
||||||
display_skipped_hosts = false
|
display_skipped_hosts = false
|
||||||
deprecation_warnings = false
|
deprecation_warnings = false
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
- name: Clear log file before write new stdout to it at this session
|
- name: Clear log file before write new stdout to it at this session
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
|
connection: local
|
||||||
tasks:
|
tasks:
|
||||||
- name: echo -n > output.log
|
- name: echo -n > output.log
|
||||||
shell: echo -n > output.log
|
shell: echo -n > output.log
|
||||||
|
|
||||||
- name: Lets Go!
|
- name: Lets Go!
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
|
connection: local
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create directory for ansible custom facts
|
- name: Create directory for ansible custom facts
|
||||||
debug:
|
debug:
|
||||||
@ -13,6 +15,8 @@
|
|||||||
|
|
||||||
- name: Generate Jira images
|
- name: Generate Jira images
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
|
connection: local
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
roles:
|
roles:
|
||||||
- atlassian.jira.9
|
# - atlassian.jira
|
||||||
|
- gurock.testrail
|
0
bin/ansible/roles/atlassian.jira.9/files/entrypoint.sh → bin/ansible/roles/atlassian.jira/files/entrypoint.sh
Normal file → Executable file
0
bin/ansible/roles/atlassian.jira.9/files/entrypoint.sh → bin/ansible/roles/atlassian.jira/files/entrypoint.sh
Normal file → Executable file
2
bin/ansible/roles/atlassian.jira/tasks/main.yml
Normal file
2
bin/ansible/roles/atlassian.jira/tasks/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
- name: "Generate images for Jira 9 (jdk8, jdk11, jdk17)"
|
||||||
|
import_tasks: atlassian.jira.9.yml
|
@ -1,4 +1,3 @@
|
|||||||
# Defaults
|
# Defaults
|
||||||
versions_file: "roles/common/files/versions/jira/9.txt"
|
versions_file: "roles/common/files/versions/jira/9.txt"
|
||||||
target_directory: "/opt/tmp/jira/"
|
target_directory: "/opt/tmp/jira/"
|
||||||
template_file: "template.env.j2"
|
|
@ -0,0 +1,54 @@
|
|||||||
|
3.0.0.3015
|
||||||
|
3.0.1.3030
|
||||||
|
3.0.2.3070
|
||||||
|
3.0.3.3084
|
||||||
|
3.0.4.3098
|
||||||
|
3.1.0.3127
|
||||||
|
3.1.0.3127
|
||||||
|
3.1.1.3130
|
||||||
|
3.1.1.3130
|
||||||
|
3.1.2.3142
|
||||||
|
3.1.2.3142
|
||||||
|
3.1.3.3146
|
||||||
|
3.1.3.3146
|
||||||
|
4.0.0.3264
|
||||||
|
4.0.0.3264
|
||||||
|
4.0.1.3267
|
||||||
|
4.0.1.3267
|
||||||
|
4.0.2.3269
|
||||||
|
4.0.2.3269
|
||||||
|
4.0.3.3270
|
||||||
|
4.0.3.3270
|
||||||
|
4.0.4.3277
|
||||||
|
4.0.4.3277
|
||||||
|
4.1.0.3291
|
||||||
|
4.1.0.3291
|
||||||
|
4.1.0.3294
|
||||||
|
4.1.0.3294
|
||||||
|
4.2.0.3312
|
||||||
|
4.2.0.3312
|
||||||
|
4.2.0.3315
|
||||||
|
4.2.0.3315
|
||||||
|
4.2.1.3321
|
||||||
|
4.2.1.3321
|
||||||
|
5.0.0.3357
|
||||||
|
5.0.0.3357
|
||||||
|
5.0.0.3363
|
||||||
|
5.0.0.3363
|
||||||
|
5.0.0.3364
|
||||||
|
5.0.0.3364
|
||||||
|
5.0.0.3365
|
||||||
|
5.0.0.3365
|
||||||
|
5.0.0.3367
|
||||||
|
5.0.0.3367
|
||||||
|
5.0.1.3370
|
||||||
|
5.0.1.3371
|
||||||
|
5.0.2.3372
|
||||||
|
5.1.0.3412
|
||||||
|
5.1.0.3413
|
||||||
|
5.2.0.3451
|
||||||
|
5.2.0.3452
|
||||||
|
5.2.1.3472
|
||||||
|
5.3.0.3603
|
||||||
|
5.4.0.3659
|
||||||
|
5.4.1.3668
|
@ -0,0 +1,10 @@
|
|||||||
|
5.4.1.3669
|
||||||
|
5.5.0.3727
|
||||||
|
5.5.0.3731
|
||||||
|
5.5.0.3735
|
||||||
|
5.5.1.3746
|
||||||
|
5.6.0.3853
|
||||||
|
5.6.0.3856
|
||||||
|
5.6.0.3861
|
||||||
|
5.6.0.3862
|
||||||
|
5.6.0.3865
|
@ -0,0 +1,21 @@
|
|||||||
|
5.7.0.3938
|
||||||
|
5.7.0.3942
|
||||||
|
5.7.0.3951
|
||||||
|
5.7.1.4026
|
||||||
|
5.7.1.4028
|
||||||
|
6.0.0.4140
|
||||||
|
6.0.1.4163
|
||||||
|
6.1.0.4367
|
||||||
|
6.1.0.4369
|
||||||
|
6.1.1.1020
|
||||||
|
6.1.1.1021
|
||||||
|
6.2.0.1085
|
||||||
|
6.2.1.1003
|
||||||
|
6.2.1.1005
|
||||||
|
6.2.2.1107
|
||||||
|
6.2.3.1114
|
||||||
|
6.3.0.1120
|
||||||
|
6.3.1.1004
|
||||||
|
6.3.1.1006
|
||||||
|
6.4.0.1284
|
||||||
|
6.4.0.1293
|
@ -0,0 +1,13 @@
|
|||||||
|
6.5.0.1298
|
||||||
|
6.5.1.1002
|
||||||
|
6.5.3.1001
|
||||||
|
6.5.4.1002
|
||||||
|
6.5.4.1007
|
||||||
|
6.5.5.1009
|
||||||
|
6.5.6.1014
|
||||||
|
6.5.7.1000
|
||||||
|
6.6.0.1156
|
||||||
|
6.6.1.1166
|
||||||
|
6.7.1.1020
|
||||||
|
6.7.2.1037
|
||||||
|
6.7.2.1043
|
@ -0,0 +1,14 @@
|
|||||||
|
7.0.0.1057
|
||||||
|
7.0.1.1002
|
||||||
|
7.0.1.1013
|
||||||
|
7.0.2.1014
|
||||||
|
7.0.2.1015
|
||||||
|
7.0.2.1016
|
||||||
|
7.4.1.8079
|
||||||
|
7.4.1.8091
|
||||||
|
7.4.1.8092
|
||||||
|
7.5.1.7010
|
||||||
|
7.5.1.7012
|
||||||
|
7.5.1.7013
|
||||||
|
7.5.2.1002
|
||||||
|
7.5.3.1000
|
@ -0,0 +1,2 @@
|
|||||||
|
8.0.0.1089
|
||||||
|
8.0.1.1029
|
19
bin/ansible/roles/gurock.testrail/files/php71/main/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php71/main/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
@ -0,0 +1,16 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /var/www/testrail
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
|
<Directory /var/www/>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
19
bin/ansible/roles/gurock.testrail/files/php72/ad/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php72/ad/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
19
bin/ansible/roles/gurock.testrail/files/php72/ldap/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php72/ldap/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
19
bin/ansible/roles/gurock.testrail/files/php72/main/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php72/main/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
@ -0,0 +1,16 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /var/www/testrail
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
|
<Directory /var/www/>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
19
bin/ansible/roles/gurock.testrail/files/php74/ad/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php74/ad/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
19
bin/ansible/roles/gurock.testrail/files/php74/ldap/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php74/ldap/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
19
bin/ansible/roles/gurock.testrail/files/php74/main/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php74/main/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
@ -0,0 +1,16 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /var/www/testrail
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
|
<Directory /var/www/>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
19
bin/ansible/roles/gurock.testrail/files/php81/ad/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php81/ad/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
19
bin/ansible/roles/gurock.testrail/files/php81/ldap/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php81/ldap/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
19
bin/ansible/roles/gurock.testrail/files/php81/main/Makefile
Normal file
19
bin/ansible/roles/gurock.testrail/files/php81/main/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
@ -0,0 +1,16 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /var/www/testrail
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
|
<Directory /var/www/>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
18
bin/ansible/roles/gurock.testrail/tasks/main.yml
Normal file
18
bin/ansible/roles/gurock.testrail/tasks/main.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#- name: "Generate images for Testrail (PHP 5.5)"
|
||||||
|
# import_tasks: testrail.php55.yml
|
||||||
|
|
||||||
|
- name: "Generate images for Testrail (PHP 7.0)"
|
||||||
|
import_tasks: testrail.php70.yml
|
||||||
|
|
||||||
|
- name: "Generate images for Testrail (PHP 7.1)"
|
||||||
|
import_tasks: testrail.php71.yml
|
||||||
|
|
||||||
|
- name: "Generate images for Testrail (PHP 7.2)"
|
||||||
|
import_tasks: testrail.php72.yml
|
||||||
|
|
||||||
|
- name: "Generate images for Testrail (PHP 7.4)"
|
||||||
|
import_tasks: testrail.php74.yml
|
||||||
|
|
||||||
|
- name: "Generate images for Testrail (PHP 8.1)"
|
||||||
|
import_tasks: testrail.php81.yml
|
||||||
|
|
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php70.yml
Normal file
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php70.yml
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
- name: Read versions from file testrail.php70.txt
|
||||||
|
slurp:
|
||||||
|
src: "roles/common/files/versions/testrail/testrail.php70.txt"
|
||||||
|
register: version_output
|
||||||
|
|
||||||
|
- name: Set version variable
|
||||||
|
set_fact:
|
||||||
|
testrail_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}"
|
||||||
|
|
||||||
|
- name: Create directories for Testrail versions with php70
|
||||||
|
file:
|
||||||
|
path: "{{ target_directory }}/{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy all files from 'files' directory to each version directory
|
||||||
|
copy:
|
||||||
|
src: "php70/"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
# no_log: true
|
||||||
|
|
||||||
|
- name: Copy template with link to each version directory
|
||||||
|
template:
|
||||||
|
src: "template.env.php70.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/.env"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/main/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/main/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/main/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/main/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/ad/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/ad/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/ad/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/ad/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/ldap/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/ldap/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/ldap/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php70/ldap/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php71.yml
Normal file
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php71.yml
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
- name: Read versions from file testrail.php71.txt
|
||||||
|
slurp:
|
||||||
|
src: "roles/common/files/versions/testrail/testrail.php71.txt"
|
||||||
|
register: version_output
|
||||||
|
|
||||||
|
- name: Set version variable
|
||||||
|
set_fact:
|
||||||
|
testrail_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}"
|
||||||
|
|
||||||
|
- name: Create directories for Testrail versions with php71
|
||||||
|
file:
|
||||||
|
path: "{{ target_directory }}/{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy all files from 'files' directory to each version directory
|
||||||
|
copy:
|
||||||
|
src: "php71/"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
# no_log: true
|
||||||
|
|
||||||
|
- name: Copy template with link to each version directory
|
||||||
|
template:
|
||||||
|
src: "template.env.php71.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/.env"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/main/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/main/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/main/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/main/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/ad/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/ad/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/ad/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/ad/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/ldap/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/ldap/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/ldap/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php71/ldap/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php72.yml
Normal file
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php72.yml
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
- name: Read versions from file testrail.php72.txt
|
||||||
|
slurp:
|
||||||
|
src: "roles/common/files/versions/testrail/testrail.php72.txt"
|
||||||
|
register: version_output
|
||||||
|
|
||||||
|
- name: Set version variable
|
||||||
|
set_fact:
|
||||||
|
testrail_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}"
|
||||||
|
|
||||||
|
- name: Create directories for Testrail versions with php72
|
||||||
|
file:
|
||||||
|
path: "{{ target_directory }}/{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy all files from 'files' directory to each version directory
|
||||||
|
copy:
|
||||||
|
src: "php72/"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
# no_log: true
|
||||||
|
|
||||||
|
- name: Copy template with link to each version directory
|
||||||
|
template:
|
||||||
|
src: "template.env.php72.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/.env"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/main/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/main/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/main/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/main/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/ad/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/ad/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/ad/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/ad/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/ldap/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/ldap/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/ldap/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php72/ldap/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php74.yml
Normal file
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php74.yml
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
- name: Read versions from file testrail.php74.txt
|
||||||
|
slurp:
|
||||||
|
src: "roles/common/files/versions/testrail/testrail.php74.txt"
|
||||||
|
register: version_output
|
||||||
|
|
||||||
|
- name: Set version variable
|
||||||
|
set_fact:
|
||||||
|
testrail_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}"
|
||||||
|
|
||||||
|
- name: Create directories for Testrail versions with php74
|
||||||
|
file:
|
||||||
|
path: "{{ target_directory }}/{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy all files from 'files' directory to each version directory
|
||||||
|
copy:
|
||||||
|
src: "php74/"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
# no_log: true
|
||||||
|
|
||||||
|
- name: Copy template with link to each version directory
|
||||||
|
template:
|
||||||
|
src: "template.env.php72.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/.env"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/main/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/main/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/main/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/main/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/ad/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/ad/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/ad/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/ad/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/ldap/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/ldap/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/ldap/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php74/ldap/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php81.yml
Normal file
100
bin/ansible/roles/gurock.testrail/tasks/testrail.php81.yml
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
- name: Read versions from file testrail.php81.txt
|
||||||
|
slurp:
|
||||||
|
src: "roles/common/files/versions/testrail/testrail.php81.txt"
|
||||||
|
register: version_output
|
||||||
|
|
||||||
|
- name: Set version variable
|
||||||
|
set_fact:
|
||||||
|
testrail_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}"
|
||||||
|
|
||||||
|
- name: Create directories for Testrail versions with php81
|
||||||
|
file:
|
||||||
|
path: "{{ target_directory }}/{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy all files from 'files' directory to each version directory
|
||||||
|
copy:
|
||||||
|
src: "php81/"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
# no_log: true
|
||||||
|
|
||||||
|
- name: Copy template with link to each version directory
|
||||||
|
template:
|
||||||
|
src: "template.env.php81.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/.env"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/main/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/main/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/main/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy main template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/main/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/main/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/ad/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/ad/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/ad/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy AD template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/ad/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ad/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-compose.yml to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/ldap/docker-compose.yml.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-compose.yml"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template docker-entrypoint.sh to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/ldap/docker-entrypoint.sh.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/docker-entrypoint.sh"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template Dockerfile to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/ldap/Dockerfile.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/Dockerfile"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
||||||
|
|
||||||
|
- name: Copy LDAP template README.md to each version directory
|
||||||
|
template:
|
||||||
|
src: "php81/ldap/README.md.j2"
|
||||||
|
dest: "{{ target_directory }}/{{ item }}/ldap/README.md"
|
||||||
|
with_items: "{{ testrail_versions }}"
|
@ -0,0 +1,13 @@
|
|||||||
|
FROM epicmorg/testrail:{{ item }}
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ad
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.0` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail-ad-:{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:auth-ad-{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "[testrail] Starting testrail service"
|
echo "[testrail] Welcome to Testrail {{item}} with Active Directory plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting Testrail service"
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
FROM epicmorg/testrail:{{ item }}
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ldap
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.0` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:auth-ldap-{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:auth-ldap-{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}} with LDAP plugin"
|
||||||
|
|
||||||
echo "[testrail] Starting testrail service"
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
@ -0,0 +1,69 @@
|
|||||||
|
FROM epicmorg/apache2:php7.0
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Testrail Install
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
#configured by dockerfile / .ENV
|
||||||
|
ARG TESTRAIL_VERSION
|
||||||
|
ARG DOWNLOAD_URL
|
||||||
|
|
||||||
|
ENV TR_DEFAULT_TASK_EXECUTION=60
|
||||||
|
|
||||||
|
ENV TESTRAIL_RELEASE_DIR=/testrail-release
|
||||||
|
|
||||||
|
ENV TR_WWW_PATH=/var/www/testrail
|
||||||
|
ENV TR_CONFIGPATH=${TR_CONFIG_DIR}
|
||||||
|
ENV TR_CONFIG_DIR=${TR_WWW_PATH}/config
|
||||||
|
ENV TR_CUSTOM_DIR=${TR_WWW_PATH}/custom
|
||||||
|
ENV TR_CUSTOM_AUTH_DIR=${TR_CUSTOM_DIR}/auth
|
||||||
|
|
||||||
|
ENV TR_OPT_PATH=/opt/testrail
|
||||||
|
ENV TR_DEFAULT_LOG_DIR=${TR_OPT_PATH}/logs
|
||||||
|
ENV TR_DEFAULT_AUDIT_DIR=${TR_OPT_PATH}/audit
|
||||||
|
ENV TR_DEFAULT_REPORT_DIR=${TR_OPT_PATH}/reports
|
||||||
|
ENV TR_DEFAULT_ATTACHMENT_DIR=${TR_OPT_PATH}/attachments
|
||||||
|
|
||||||
|
ENV TR_OPTPATH="/opt/testrail/"
|
||||||
|
ENV TR_CONFIGPATH="/var/www/testrail/config/"
|
||||||
|
|
||||||
|
ENV OPENSSL_CONF=/etc/ssl/
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends zlib1g-dev libcurl4-gnutls-dev libldap2-dev zlib1g-dev libxml2-dev libfontconfig1 && \
|
||||||
|
apt-get clean && \
|
||||||
|
echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
rm -rf /run.sh && \
|
||||||
|
rm -rf /tmp/*
|
||||||
|
|
||||||
|
RUN echo "[testrail] Preparing folders" && \
|
||||||
|
mkdir -p ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
mkdir -p ${TR_WWW_PATH} && \
|
||||||
|
mkdir -p ${TR_DEFAULT_ATTACHMENT_DIR} ${TR_DEFAULT_REPORT_DIR} ${TR_DEFAULT_AUDIT_DIR} ${TR_DEFAULT_LOG_DIR} && \
|
||||||
|
echo "[testrail] Downloading and installing" && \
|
||||||
|
wget --no-check-certificate -O ${TESTRAIL_RELEASE_DIR}/testrail.zip ${DOWNLOAD_URL} && \
|
||||||
|
chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/ && \
|
||||||
|
chown -R www-data:www-data ${TR_WWW_PATH} && \
|
||||||
|
ls -las ${TR_WWW_PATH} && \
|
||||||
|
chown -R www-data:www-data ${TR_OPT_PATH} && \
|
||||||
|
ls -las ${TR_OPT_PATH}
|
||||||
|
|
||||||
|
RUN echo "[testrail] Testrail version is: $(cat ${TR_WWW_PATH}/version.txt)"
|
||||||
|
|
||||||
|
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf
|
||||||
|
|
||||||
|
#healthcheck. good practice
|
||||||
|
HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1
|
||||||
|
|
||||||
|
# Add image configuration and scripts
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
RUN chmod 755 /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
#Final config
|
||||||
|
WORKDIR /var/www/testrail
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"]
|
||||||
|
CMD ["docker-entrypoint.sh"]
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.0` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,9 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
RELEASE: ${TESTRAIL_VERSION}
|
||||||
|
DOWNLOAD_URL: ${DOWNLOAD_URL}
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}}"
|
||||||
|
|
||||||
echo "[testrail] Starting testrail service"
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
@ -0,0 +1,13 @@
|
|||||||
|
FROM epicmorg/testrail:{{ item }}
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ad
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail-ad-:{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:auth-ad-{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}} with Active Directory plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting Testrail service"
|
||||||
|
|
||||||
|
##################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail Active Directory auth plugin"
|
||||||
|
unzip -q -o -j ${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} ${TESTRAIL_PLUGIN_FULLNAME}/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
@ -0,0 +1,13 @@
|
|||||||
|
FROM epicmorg/testrail:{{ item }}
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ldap
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:auth-ldap-{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:auth-ldap-{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}} with LDAP plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail LDAP auth plugin"
|
||||||
|
unzip -q -o -j ${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} ${TESTRAIL_PLUGIN_FULLNAME}/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
@ -0,0 +1,69 @@
|
|||||||
|
FROM epicmorg/apache2:php7.1
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Testrail Install
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
#configured by dockerfile / .ENV
|
||||||
|
ARG TESTRAIL_VERSION
|
||||||
|
ARG DOWNLOAD_URL
|
||||||
|
|
||||||
|
ENV TR_DEFAULT_TASK_EXECUTION=60
|
||||||
|
|
||||||
|
ENV TESTRAIL_RELEASE_DIR=/testrail-release
|
||||||
|
|
||||||
|
ENV TR_WWW_PATH=/var/www/testrail
|
||||||
|
ENV TR_CONFIGPATH=${TR_CONFIG_DIR}
|
||||||
|
ENV TR_CONFIG_DIR=${TR_WWW_PATH}/config
|
||||||
|
ENV TR_CUSTOM_DIR=${TR_WWW_PATH}/custom
|
||||||
|
ENV TR_CUSTOM_AUTH_DIR=${TR_CUSTOM_DIR}/auth
|
||||||
|
|
||||||
|
ENV TR_OPT_PATH=/opt/testrail
|
||||||
|
ENV TR_DEFAULT_LOG_DIR=${TR_OPT_PATH}/logs
|
||||||
|
ENV TR_DEFAULT_AUDIT_DIR=${TR_OPT_PATH}/audit
|
||||||
|
ENV TR_DEFAULT_REPORT_DIR=${TR_OPT_PATH}/reports
|
||||||
|
ENV TR_DEFAULT_ATTACHMENT_DIR=${TR_OPT_PATH}/attachments
|
||||||
|
|
||||||
|
ENV TR_OPTPATH="/opt/testrail/"
|
||||||
|
ENV TR_CONFIGPATH="/var/www/testrail/config/"
|
||||||
|
|
||||||
|
ENV OPENSSL_CONF=/etc/ssl/
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends zlib1g-dev libcurl4-gnutls-dev libldap2-dev zlib1g-dev libxml2-dev libfontconfig1 && \
|
||||||
|
apt-get clean && \
|
||||||
|
echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
rm -rf /run.sh && \
|
||||||
|
rm -rf /tmp/*
|
||||||
|
|
||||||
|
RUN echo "[testrail] Preparing folders" && \
|
||||||
|
mkdir -p ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
mkdir -p ${TR_WWW_PATH} && \
|
||||||
|
mkdir -p ${TR_DEFAULT_ATTACHMENT_DIR} ${TR_DEFAULT_REPORT_DIR} ${TR_DEFAULT_AUDIT_DIR} ${TR_DEFAULT_LOG_DIR} && \
|
||||||
|
echo "[testrail] Downloading and installing" && \
|
||||||
|
wget --no-check-certificate -O ${TESTRAIL_RELEASE_DIR}/testrail.zip ${DOWNLOAD_URL} && \
|
||||||
|
chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/ && \
|
||||||
|
chown -R www-data:www-data ${TR_WWW_PATH} && \
|
||||||
|
ls -las ${TR_WWW_PATH} && \
|
||||||
|
chown -R www-data:www-data ${TR_OPT_PATH} && \
|
||||||
|
ls -las ${TR_OPT_PATH}
|
||||||
|
|
||||||
|
RUN echo "[testrail] Testrail version is: $(cat ${TR_WWW_PATH}/version.txt)"
|
||||||
|
|
||||||
|
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf
|
||||||
|
|
||||||
|
#healthcheck. good practice
|
||||||
|
HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1
|
||||||
|
|
||||||
|
# Add image configuration and scripts
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
RUN chmod 755 /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
#Final config
|
||||||
|
WORKDIR /var/www/testrail
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"]
|
||||||
|
CMD ["docker-entrypoint.sh"]
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,9 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
RELEASE: ${TESTRAIL_VERSION}
|
||||||
|
DOWNLOAD_URL: ${DOWNLOAD_URL}
|
@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}}"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
chown -R www-data:www-data ${TR_CONFIGPATH}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
@ -0,0 +1,13 @@
|
|||||||
|
FROM epicmorg/testrail:{{ item }}
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ad
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.2` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail-ad-:{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:auth-ad-{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}} with Active Directory plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting Testrail service"
|
||||||
|
|
||||||
|
##################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail Active Directory auth plugin"
|
||||||
|
unzip -q -o -j ${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} ${TESTRAIL_PLUGIN_FULLNAME}/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
@ -0,0 +1,13 @@
|
|||||||
|
FROM epicmorg/testrail:{{ item }}
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ldap
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.2` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:auth-ldap-{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:auth-ldap-{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}} with LDAP plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail LDAP auth plugin"
|
||||||
|
unzip -q -o -j ${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} ${TESTRAIL_PLUGIN_FULLNAME}/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
@ -0,0 +1,69 @@
|
|||||||
|
FROM epicmorg/apache2:php7.2
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Testrail Install
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
#configured by dockerfile / .ENV
|
||||||
|
ARG TESTRAIL_VERSION
|
||||||
|
ARG DOWNLOAD_URL
|
||||||
|
|
||||||
|
ENV TR_DEFAULT_TASK_EXECUTION=60
|
||||||
|
|
||||||
|
ENV TESTRAIL_RELEASE_DIR=/testrail-release
|
||||||
|
|
||||||
|
ENV TR_WWW_PATH=/var/www/testrail
|
||||||
|
ENV TR_CONFIGPATH=${TR_CONFIG_DIR}
|
||||||
|
ENV TR_CONFIG_DIR=${TR_WWW_PATH}/config
|
||||||
|
ENV TR_CUSTOM_DIR=${TR_WWW_PATH}/custom
|
||||||
|
ENV TR_CUSTOM_AUTH_DIR=${TR_CUSTOM_DIR}/auth
|
||||||
|
|
||||||
|
ENV TR_OPT_PATH=/opt/testrail
|
||||||
|
ENV TR_DEFAULT_LOG_DIR=${TR_OPT_PATH}/logs
|
||||||
|
ENV TR_DEFAULT_AUDIT_DIR=${TR_OPT_PATH}/audit
|
||||||
|
ENV TR_DEFAULT_REPORT_DIR=${TR_OPT_PATH}/reports
|
||||||
|
ENV TR_DEFAULT_ATTACHMENT_DIR=${TR_OPT_PATH}/attachments
|
||||||
|
|
||||||
|
ENV TR_OPTPATH="/opt/testrail/"
|
||||||
|
ENV TR_CONFIGPATH="/var/www/testrail/config/"
|
||||||
|
|
||||||
|
ENV OPENSSL_CONF=/etc/ssl/
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends zlib1g-dev libcurl4-gnutls-dev libldap2-dev zlib1g-dev libxml2-dev libfontconfig1 && \
|
||||||
|
apt-get clean && \
|
||||||
|
echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
rm -rf /run.sh && \
|
||||||
|
rm -rf /tmp/*
|
||||||
|
|
||||||
|
RUN echo "[testrail] Preparing folders" && \
|
||||||
|
mkdir -p ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
mkdir -p ${TR_WWW_PATH} && \
|
||||||
|
mkdir -p ${TR_DEFAULT_ATTACHMENT_DIR} ${TR_DEFAULT_REPORT_DIR} ${TR_DEFAULT_AUDIT_DIR} ${TR_DEFAULT_LOG_DIR} && \
|
||||||
|
echo "[testrail] Downloading and installing" && \
|
||||||
|
wget --no-check-certificate -O ${TESTRAIL_RELEASE_DIR}/testrail.zip ${DOWNLOAD_URL} && \
|
||||||
|
chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/ && \
|
||||||
|
chown -R www-data:www-data ${TR_WWW_PATH} && \
|
||||||
|
ls -las ${TR_WWW_PATH} && \
|
||||||
|
chown -R www-data:www-data ${TR_OPT_PATH} && \
|
||||||
|
ls -las ${TR_OPT_PATH}
|
||||||
|
|
||||||
|
RUN echo "[testrail] Testrail version is: $(cat ${TR_WWW_PATH}/version.txt)"
|
||||||
|
|
||||||
|
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf
|
||||||
|
|
||||||
|
#healthcheck. good practice
|
||||||
|
HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1
|
||||||
|
|
||||||
|
# Add image configuration and scripts
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
RUN chmod 755 /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
#Final config
|
||||||
|
WORKDIR /var/www/testrail
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"]
|
||||||
|
CMD ["docker-entrypoint.sh"]
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.2` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,9 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
RELEASE: ${TESTRAIL_VERSION}
|
||||||
|
DOWNLOAD_URL: ${DOWNLOAD_URL}
|
@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}}"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
chown -R www-data:www-data ${TR_CONFIGPATH}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
@ -0,0 +1,13 @@
|
|||||||
|
FROM epicmorg/testrail:{{ item }}
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ad
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.4` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail-ad-:{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:auth-ad-{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}} with Active Directory plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting Testrail service"
|
||||||
|
|
||||||
|
##################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail Active Directory auth plugin"
|
||||||
|
unzip -q -o -j ${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} ${TESTRAIL_PLUGIN_FULLNAME}/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
@ -0,0 +1,13 @@
|
|||||||
|
FROM epicmorg/testrail:{{ item }}
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ldap
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.4` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:auth-ldap-{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:auth-ldap-{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}} with LDAP plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail LDAP auth plugin"
|
||||||
|
unzip -q -o -j ${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} ${TESTRAIL_PLUGIN_FULLNAME}/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
@ -0,0 +1,69 @@
|
|||||||
|
FROM epicmorg/apache2:php7.4
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Testrail Install
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
#configured by dockerfile / .ENV
|
||||||
|
ARG TESTRAIL_VERSION
|
||||||
|
ARG DOWNLOAD_URL
|
||||||
|
|
||||||
|
ENV TR_DEFAULT_TASK_EXECUTION=60
|
||||||
|
|
||||||
|
ENV TESTRAIL_RELEASE_DIR=/testrail-release
|
||||||
|
|
||||||
|
ENV TR_WWW_PATH=/var/www/testrail
|
||||||
|
ENV TR_CONFIGPATH=${TR_CONFIG_DIR}
|
||||||
|
ENV TR_CONFIG_DIR=${TR_WWW_PATH}/config
|
||||||
|
ENV TR_CUSTOM_DIR=${TR_WWW_PATH}/custom
|
||||||
|
ENV TR_CUSTOM_AUTH_DIR=${TR_CUSTOM_DIR}/auth
|
||||||
|
|
||||||
|
ENV TR_OPT_PATH=/opt/testrail
|
||||||
|
ENV TR_DEFAULT_LOG_DIR=${TR_OPT_PATH}/logs
|
||||||
|
ENV TR_DEFAULT_AUDIT_DIR=${TR_OPT_PATH}/audit
|
||||||
|
ENV TR_DEFAULT_REPORT_DIR=${TR_OPT_PATH}/reports
|
||||||
|
ENV TR_DEFAULT_ATTACHMENT_DIR=${TR_OPT_PATH}/attachments
|
||||||
|
|
||||||
|
ENV TR_OPTPATH="/opt/testrail/"
|
||||||
|
ENV TR_CONFIGPATH="/var/www/testrail/config/"
|
||||||
|
|
||||||
|
ENV OPENSSL_CONF=/etc/ssl/
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends zlib1g-dev libcurl4-gnutls-dev libldap2-dev zlib1g-dev libxml2-dev libfontconfig1 && \
|
||||||
|
apt-get clean && \
|
||||||
|
echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
rm -rf /run.sh && \
|
||||||
|
rm -rf /tmp/*
|
||||||
|
|
||||||
|
RUN echo "[testrail] Preparing folders" && \
|
||||||
|
mkdir -p ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
mkdir -p ${TR_WWW_PATH} && \
|
||||||
|
mkdir -p ${TR_DEFAULT_ATTACHMENT_DIR} ${TR_DEFAULT_REPORT_DIR} ${TR_DEFAULT_AUDIT_DIR} ${TR_DEFAULT_LOG_DIR} && \
|
||||||
|
echo "[testrail] Downloading and installing" && \
|
||||||
|
wget --no-check-certificate -O ${TESTRAIL_RELEASE_DIR}/testrail.zip ${DOWNLOAD_URL} && \
|
||||||
|
chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/ && \
|
||||||
|
chown -R www-data:www-data ${TR_WWW_PATH} && \
|
||||||
|
ls -las ${TR_WWW_PATH} && \
|
||||||
|
chown -R www-data:www-data ${TR_OPT_PATH} && \
|
||||||
|
ls -las ${TR_OPT_PATH}
|
||||||
|
|
||||||
|
RUN echo "[testrail] Testrail version is: $(cat ${TR_WWW_PATH}/version.txt)"
|
||||||
|
|
||||||
|
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf
|
||||||
|
|
||||||
|
#healthcheck. good practice
|
||||||
|
HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1
|
||||||
|
|
||||||
|
# Add image configuration and scripts
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
RUN chmod 755 /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
#Final config
|
||||||
|
WORKDIR /var/www/testrail
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"]
|
||||||
|
CMD ["docker-entrypoint.sh"]
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php7.4` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,9 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
RELEASE: ${TESTRAIL_VERSION}
|
||||||
|
DOWNLOAD_URL: ${DOWNLOAD_URL}
|
@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}}"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
chown -R www-data:www-data ${TR_CONFIGPATH}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
@ -0,0 +1,13 @@
|
|||||||
|
FROM epicmorg/testrail:{{ item }}
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ad
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
@ -0,0 +1,36 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail-ad-:{{ item }}
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/testrail:auth-ad-{{ item }}"
|
||||||
|
build:
|
||||||
|
context: .
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail {{item}} with Active Directory plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting Testrail service"
|
||||||
|
|
||||||
|
##################################################################################
|
||||||
|
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d $1 ]
|
||||||
|
then
|
||||||
|
echo "[testrail] Creating " $1
|
||||||
|
mkdir -p $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data $1
|
||||||
|
}
|
||||||
|
|
||||||
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
|
echo "[testrail] Unzipping testrail Active Directory auth plugin"
|
||||||
|
unzip -q -o -j ${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} ${TESTRAIL_PLUGIN_FULLNAME}/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
||||||
|
|
||||||
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f /var/www/testrail/task.php ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
while /bin/true; do
|
||||||
|
php /var/www/testrail/task.php || true
|
||||||
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
|
done &
|
||||||
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||||
|
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user