Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Docker for Drupal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Composer
plugin
Docker for Drupal
Commits
d28119de
Commit
d28119de
authored
1 year ago
by
jurgenhaas
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' into 'main'
Merging develop into main See merge request
!82
parents
fa67c95d
83022da3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!82
Merging develop into main
Pipeline
#1157604
passed
1 year ago
Stage: release
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Handler.php
+13
-0
13 additions, 0 deletions
src/Handler.php
templates/docker-compose.yml.twig
+103
-0
103 additions, 0 deletions
templates/docker-compose.yml.twig
templates/in-vhost.conf.twig
+27
-0
27 additions, 0 deletions
templates/in-vhost.conf.twig
with
143 additions
and
0 deletions
src/Handler.php
+
13
−
0
View file @
d28119de
...
...
@@ -221,6 +221,9 @@ class Handler extends BaseHandler {
'enable'
=>
$this
->
env
->
receiveGlobal
(
'UNLIGHTHOUSE'
,
'Unlighthouse'
,
'0'
),
'urlprefix'
=>
''
,
],
'invoiceninja'
=>
[
'enable'
=>
0
,
],
];
}
...
...
@@ -248,6 +251,7 @@ class Handler extends BaseHandler {
'$SSH_AUTH_SOCK'
;
}
$this
->
config
->
setValue
(
'projectroot'
,
$projectRoot
,
FALSE
);
$this
->
config
->
setValue
(
'projectrootfiles'
,
$projectRoot
,
FALSE
);
$this
->
config
->
setValue
(
'projectdomain'
,
str_replace
(
'_'
,
'-'
,
$this
->
config
->
readValue
(
'projectname'
))
.
'.'
.
$traefik
[
'domain'
],
FALSE
);
$this
->
config
->
setValue
(
'projectprotocol'
,
'http'
.
(
$traefik
[
'usessl'
]
?
's'
:
''
),
FALSE
);
$this
->
config
->
setValue
(
'socketprotocol'
,
'ws'
.
(
$traefik
[
'usessl'
]
?
's'
:
''
),
FALSE
);
...
...
@@ -514,6 +518,11 @@ class Handler extends BaseHandler {
// Ignore some Unlighthouse directories.
$this
->
gitIgnore
(
'tests/unlighthouse'
);
if
(
$this
->
config
->
readValue
([
'invoiceninja'
,
'enable'
]))
{
// Ignore Invoice Ninja directory.
$this
->
gitIgnore
(
'/in/'
);
}
if
(
getenv
(
'LAKEDROPS_BUILD_NG'
)
!==
'yes'
)
{
$this
->
updateTraefik
();
}
...
...
@@ -633,6 +642,10 @@ class Handler extends BaseHandler {
'mailpitout.yml'
=>
[
'dest'
=>
$projectRoot
.
'/tests'
,
],
'in-vhost.conf'
=>
[
'dest'
=>
$projectRoot
.
'/config'
,
'condition'
=>
$this
->
config
->
readValue
([
'invoiceninja'
,
'enable'
]),
],
];
$files
[
'cypress.config.js'
]
=
[
'source'
=>
'tests/'
,
...
...
This diff is collapsed.
Click to expand it.
templates/docker-compose.yml.twig
+
103
−
0
View file @
d28119de
...
...
@@ -634,3 +634,106 @@ services:
traefik.http.routers.unlighthouse-
{{
projectname
}}
.tls.certresolver: lakedrops
{%
endif
%}
{%
endif
%}
{%
if
invoiceninja.enable
|
default
(
0
)
%}
in-db:
image: 'mysql:5'
environment:
- APP_ENV=production
- 'APP_URL=https://invoice-
{{
projectdomain
}}
'
- 'APP_KEY=
{{
invoiceninja.api_key
}}
'
- APP_DEBUG=false
- REQUIRE_HTTPS=false
- PHANTOMJS_PDF_GENERATION=false
- PDF_GENERATOR=snappdf
- QUEUE_CONNECTION=database
- 'TRUSTED_PROXIES=*'
- IS_DOCKER=true
- DB_HOST=in-db
- DB_PORT=3306
- DB_DATABASE=ninja
- DB_USERNAME=ninja
- DB_PASSWORD=ninja
- IN_USER_EMAIL=
{{
invoiceninja.admin_name
}}
- IN_PASSWORD=
{{
invoiceninja.admin_pass
}}
- MAIL_MAILER=smtp
- MAIL_HOST=
{{
invoiceninja.mail.host
}}
- MAIL_PORT=
{{
invoiceninja.mail.port
}}
- MAIL_USERNAME=
{{
invoiceninja.mail.user
}}
- 'MAIL_PASSWORD=
{{
invoiceninja.mail.pass
}}
'
- MAIL_ENCRYPTION=
{{
invoiceninja.mail.security
}}
- MAIL_FROM_ADDRESS=
{{
invoiceninja.mail.user
}}
- "MAIL_FROM_NAME='
{{
invoiceninja.mail.fromname
}}
'"
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
- MYSQL_USER=ninja
- MYSQL_PASSWORD=ninja
- MYSQL_DATABASE=ninja
volumes:
- '/etc/timezone:/etc/timezone:ro'
- '/etc/localtime:/etc/localtime:ro'
- '
{{
projectrootfiles
}}
/in/mysql/data:/var/lib/mysql:rw,delegated'
in-app:
# After first startup, call "sudo chown -R 1500:1500 app" and start again.
image: 'invoiceninja/invoiceninja:5'
depends_on:
- in-db
environment:
- APP_ENV=production
- 'APP_URL=https://invoice-
{{
projectdomain
}}
'
- 'APP_KEY=
{{
invoiceninja.api_key
}}
'
- APP_DEBUG=false
- REQUIRE_HTTPS=false
- PHANTOMJS_PDF_GENERATION=false
- PDF_GENERATOR=snappdf
- QUEUE_CONNECTION=database
- 'TRUSTED_PROXIES=*'
- IS_DOCKER=true
- DB_HOST=in-db
- DB_PORT=3306
- DB_DATABASE=ninja
- DB_USERNAME=ninja
- DB_PASSWORD=ninja
- IN_USER_EMAIL=
{{
invoiceninja.admin_name
}}
- IN_PASSWORD=
{{
invoiceninja.admin_pass
}}
- MAIL_MAILER=smtp
- MAIL_HOST=
{{
invoiceninja.mail.host
}}
- MAIL_PORT=
{{
invoiceninja.mail.port
}}
- MAIL_USERNAME=
{{
invoiceninja.mail.user
}}
- 'MAIL_PASSWORD=
{{
invoiceninja.mail.pass
}}
'
- MAIL_ENCRYPTION=
{{
invoiceninja.mail.security
}}
- MAIL_FROM_ADDRESS=
{{
invoiceninja.mail.user
}}
- "MAIL_FROM_NAME='
{{
invoiceninja.mail.fromname
}}
'"
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
- MYSQL_USER=ninja
- MYSQL_PASSWORD=ninja
- MYSQL_DATABASE=ninja
volumes:
- '/etc/timezone:/etc/timezone:ro'
- '/etc/localtime:/etc/localtime:ro'
- '
{{
projectrootfiles
}}
/in/app/public:/var/www/app/public:rw,delegated'
- '
{{
projectrootfiles
}}
/in/app/storage:/var/www/app/storage:rw,delegated'
in-web:
image: nginx
networks:
- traefik-public
- default
depends_on:
- in-app
volumes:
- '/etc/timezone:/etc/timezone:ro'
- '/etc/localtime:/etc/localtime:ro'
- '
{{
projectroot
}}
/config/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro'
- '
{{
projectrootfiles
}}
/in/app/public:/var/www/app/public:ro'
labels:
traefik.enable: 'true'
traefik.docker.network: traefik-public
{%
if
basicauth.enable
%}
traefik.http.middlewares.invoice_ninja-
{{
projectname
}}
-auth.basicauth.users:
{{
basicauth.code
}}
{%
endif
%}
'traefik.http.services.invoice_ninja
{{
projectname
}}
.loadbalancer.server.port': 80
'traefik.http.routers.invoice_ninja
{{
projectname
}}
.rule': Host(`invoice-
{{
projectdomain
}}
`)
{%
if
drupal.live
|
default
(
0
)
or
traefik.usessl
%}
'traefik.http.routers.invoice_ninja
{{
projectname
}}
.tls': 'true'
'traefik.http.routers.invoice_ninja
{{
projectname
}}
.tls.certresolver': lakedrops
{%
endif
%}
{%
endif
%}
This diff is collapsed.
Click to expand it.
templates/in-vhost.conf.twig
0 → 100644
+
27
−
0
View file @
d28119de
server {
listen 80 default_server;
server_name _;
client_max_body_size 100M;
root /var/www/app/public/;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass in-app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment