Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud_orchestrator
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
cloud_orchestrator
Commits
4ccfd8e4
Commit
4ccfd8e4
authored
3 years ago
by
Yas Naoi
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3267897
by yas: Refactor .tugboat/config.xml for live previews
parent
88673096
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!22
Issue #3267897: Refactor .tugboat/config.xml for live previews
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.tugboat/config.yml
+13
-20
13 additions, 20 deletions
.tugboat/config.yml
with
13 additions
and
20 deletions
.tugboat/config.yml
+
13
−
20
View file @
4ccfd8e4
services
:
php
:
image
:
q0rban/tugboat-drupal:latest
privileged
:
true
default
:
true
http
:
false
# depends: mysql
...
...
@@ -8,7 +9,7 @@ services:
init
:
|
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
apt-get update && apt-get install -y gcc g++ make nodejs yarnpkg zlib1g \
libfreetype6-dev libjpeg-dev libmemcached-dev libpng-dev libzip-dev
libfreetype6-dev libjpeg-dev libmemcached-dev libpng-dev libzip-dev
> /dev/null 2>&1
update
:
|
set -eux
...
...
@@ -25,36 +26,31 @@ services:
git checkout -b "${TUGBOAT_REPO_ID}"
# Install Memcached libraries.
apt-get install -y libmemcached-dev
git clone https://github.com/php-memcached-dev/php-memcached /usr/src/php/ext/memcached
cd /usr/src/php/ext/memcached
docker-php-ext-configure memcached
docker-php-ext-install memcached
docker-php-ext-install memcached > /dev/null 2>&1
# Install APCU libraries.
git clone https://github.com/krakjoe/apcu /usr/src/php/ext/apcu
cd /usr/src/php/ext/apcu
docker-php-ext-configure apcu
docker-php-ext-install apcu
docker-php-ext-install apcu > /dev/null 2>&1
# Install OpCache.
docker-php-ext-install -j "$(nproc)" opcache
docker-php-ext-install -j "$(nproc)" opcache
> /dev/null 2>&1
# Install uploadprogress.
pecl install uploadprogress
git clone https://github.com/php/pecl-php-uploadprogress /usr/src/php/ext/uploadprogress
cd /usr/src/php/ext/uploadprogress
docker-php-ext-configure uploadprogress
docker-php-ext-install uploadprogress
docker-php-ext-install uploadprogress > /dev/null 2>&1
# Install graphic libraries.
docker-php-ext-configure gd \
--with-freetype \
--with-jpeg
docker-php-ext-configure zip
docker-php-ext-install -j "$(nproc)" \
gd \
zip
zip
> /dev/null 2>&1
# Composer is hungry. You need a Tugboat project with a pretty sizeable
# chunk of memory.
...
...
@@ -121,7 +117,7 @@ services:
# Use --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat for mysql connection.
cd "${DRUPAL_DOCROOT}"
drush si -y \
--db-url=sqlite://
sites/default/files
/db.sqlite \
--db-url=
"
sqlite://
${FILES_DIR}
/db.sqlite
"
\
--site-name="Cloud Orchestrator live preview for '${TUGBOAT_PREVIEW_NAME}'" \
--account-pass='admin' \
cloud_orchestrator \
...
...
@@ -135,18 +131,15 @@ services:
drush -y en memcache memcache_admin
drush -y en simple_oauth
# Set a private directory.
mkdir -p "${PRIVATE_DIR}"
# Set up a files directory.
mkdir -p "${DRUPAL_DOCROOT}/${FILES_DIR}"
chgrp -R www-data "${DRUPAL_DOCROOT}/${FILES_DIR}"
chmod 2775 "${DRUPAL_DOCROOT}/${FILES_DIR}"
chmod
-R
2775 "${DRUPAL_DOCROOT}/${FILES_DIR}"
chmod -R g+w "${DRUPAL_DOCROOT}/${FILES_DIR}"
# Set a private directory.
mkdir -p "${PRIVATE_DIR}"
chgrp -R www-data "${PRIVATE_DIR}"
chmod 2775 "${PRIVATE_DIR}"
chmod -R g+w "${PRIVATE_DIR}"
# The settings must be written after enabling the memcache module.
tee -a "${SETTINGS_FILE}" > /dev/null << EOF
\$settings['memcache']['servers'] = ['memcached:11211' => 'default'];
...
...
@@ -157,7 +150,7 @@ services:
# Setup crontab.
{ echo '*/5 * * * * www-data cd /var/www/cloud_orchestrator && /usr/local/bin/drush cron > /dev/null 2>&1'; } >> /etc/crontab
{ echo '*/5 * * * * www-data cd /var/www/
html/web
&& for MODULE in '\''aws_cloud'\'' '\''k8s'\'' '\''openstack'\'' '\''vmware'\'' '\''terraform'\''; do export QUEUE=$(drush queue-list | grep "$''{MODULE}" | awk '\''{print $1}'\''); if [ "$''{QUEUE}" ]; then drush queue-run "$''{QUEUE}" --time-limit=120 > /dev/null 2>&1; fi done'; } >> /etc/crontab
{ echo '*/5 * * * * www-data cd /var/www/
cloud_orchestrator
&& for MODULE in '\''aws_cloud'\'' '\''k8s'\'' '\''openstack'\'' '\''vmware'\'' '\''terraform'\''; do export QUEUE=$(drush queue-list | grep "$''{MODULE}" | awk '\''{print $1}'\''); if [ "$''{QUEUE}" ]; then drush queue-run "$''{QUEUE}" --time-limit=120 > /dev/null 2>&1; fi done'; } >> /etc/crontab
build
:
|
set -eux
...
...
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