Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
slapos
Commits
574259c9
Commit
574259c9
authored
Jun 12, 2023
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack/drupal: remove next.js from SR
parent
d5a37c44
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
101 deletions
+1
-101
stack/drupal/buildout.cfg
stack/drupal/buildout.cfg
+0
-1
stack/drupal/buildout.hash.cfg
stack/drupal/buildout.hash.cfg
+1
-1
stack/drupal/drupal-instance.cfg.in
stack/drupal/drupal-instance.cfg.in
+0
-99
No files found.
stack/drupal/buildout.cfg
View file @
574259c9
...
...
@@ -28,7 +28,6 @@ db-user = drupal
publish-list =
admin-username
admin-password
nextjs-url
[create-next-app]
recipe = plone.recipe.command
...
...
stack/drupal/buildout.hash.cfg
View file @
574259c9
...
...
@@ -4,7 +4,7 @@ md5sum = 158282e578bf9416f5e0e524496b9f68
[template-drupal-instance]
filename = drupal-instance.cfg.in
md5sum =
61dada62768497bd6c5899573490c4ee
md5sum =
b0c371ae31203d3984599ee617fd8f65
[template-settings.php]
filename = default.settings.php.in
...
...
stack/drupal/drupal-instance.cfg.in
View file @
574259c9
...
...
@@ -8,10 +8,6 @@ extends =
parts +=
drupal-site-install
next-server
proxy-apache-httpd
promise-next-server
nextjs-frontend-promise
eggs-directory = {{ eggs_directory }}
...
...
@@ -22,12 +18,6 @@ offline = true
[apache-php-configuration]
enable-php8 = !py!True
document-root = ${:default-document-root}/docroot
node-port = 8000
node-server = ${next-server:host}:${next-server:port}
[directory]
node = ${:srv}/node
[template-base]
recipe = slapos.recipe.template:jinja2
...
...
@@ -101,70 +91,6 @@ env =
export PATH={{ mariadb_location }}/bin:${directory:bin}:$PATH
env-name = site
[next-env]
<= env-base
env =
export PATH={{ nodejs_location }}/bin:$PATH
export NEXT_PUBLIC_DRUPAL_BASE_URL=${request-frontend:connection-secure_access}
export NEXT_IMAGE_DOMAIN=${request-frontend:connection-domain}
export DRUPAL_PREVIEW_SECRET=
export DRUPAL_REVALIDATE_SECRET=
export DRUPAL_SITE_ID=
export DRUPAL_FRONT_PAGE=
## Authentication (Bearer)
#export DRUPAL_CLIENT_ID=
#export DRUPAL_CLIENT_SECRET=
#
## Authentication (Basic)
#export DRUPAL_USERNAME=
#export DRUPAL_PASSWORD=
env-name = next
[build-next]
recipe = plone.recipe.command
command = if [ -z "$(ls -A ${directory:node})" ]; then
rm -rf ${directory:node};
cp -ax {{ nextjs_app_location }}/ ${directory:node};
fi
if [ -s "${directory:var}/.install-done" ]; then
# build next.js require next and next_jsonapi installed
export NEXT_PUBLIC_DRUPAL_BASE_URL=${request-frontend:connection-secure_access}
export NEXT_IMAGE_DOMAIN=${request-frontend:connection-domain}
cd ${directory:node}
{{ nodejs_location }}/bin/npm run build
fi
update-command = ${:command}
# Start next.js server
[next-server-script]
output = ${directory:bin}/next.js-server
recipe = collective.recipe.template
mode = 744
input = inline:#!/bin/sh
. ${next-env:output}
cd ${directory:node}
npx next start "$@"
depends = ${build-next:recipe}
[next-server]
recipe = slapos.cookbook:wrapper
command-line =
${next-server-script:output} -p ${:port} -H ${:host}
wrapper-path = ${directory:services}/next.js-server
port = 3001
# Cannot listen on Ipv6
host = ${apache-network-configuration:listening-ip4}
wait-for-files =
${directory:var}/.install-done
[promise-next-server]
# Check any apache port in ipv4, expect other ports and ipv6 to behave consistently
<= monitor-promise-base
promise = check_socket_listening
name = nextjs-server-port-listening.py
config-host = ${next-server:host}
config-port = ${next-server:port}
[drupal-site-install]
output = ${directory:scripts}/drupal-install
recipe = collective.recipe.template
...
...
@@ -220,30 +146,6 @@ depends =
recipe = slapos.cookbook:generate.password
storage-path = ${directory:etc}/.admin_pwd
[proxy-apache-httpd]
recipe = slapos.recipe.template:jinja2
url = {{ template_apache_conf }}
output = ${directory:apache.d}/apache-drupal.conf
context =
section parameter_dict apache-php-configuration
[request-nextjs-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Next.js Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
shared = true
config-url = https://[${apache-php-configuration:ip}]:${apache-php-configuration:node-port}
config-https-only = true
return = domain secure_access
[nextjs-frontend-promise]
<= monitor-promise-base
promise = check_url_available
name = nextjs-server-frontend.py
config-url = ${request-nextjs-frontend:connection-secure_access}
[instance-parameter]
tmp-dir = ${directory:tmp}
trusted-host-list =
...
...
@@ -260,7 +162,6 @@ account-mail = ${slap-parameter:instance.account-mail}
[publish-connection-information]
admin-username = ${instance-parameter:account-name}
admin-password = ${drupal-admin-passwd:passwd}
nextjs-url = ${request-nextjs-frontend:connection-secure_access}
[slap-parameter]
instance.site-profile = standard
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment