Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
04e2874
removes lando and .environment files from woocommerce
gilzow May 30, 2023
64604a3
removes README from woocommerce
gilzow May 30, 2023
af49a83
removes .environment, .lando.upstream and README from WordPress Bedrock
gilzow May 30, 2023
e469964
From WordPress vanilla, removes:
gilzow May 30, 2023
e3c1dd8
Merge branch 'master' into enhance/846b-tb-cleanup-phase1dot5
gilzow May 31, 2023
121d374
Merge branch 'master' into enhance/846b-tb-cleanup-phase1dot5
gilzow May 31, 2023
d3ba5e2
syncs WordPress Vanilla psh config file with the updated version in t…
gilzow May 31, 2023
e9403f3
Updates platformify method for WordPress vanilla. We no longer need t…
gilzow May 31, 2023
bc15205
Removes the following from the root of the D10 project:
gilzow May 31, 2023
a6efbdf
Removes the following from the root of the D9 template:
gilzow May 31, 2023
25b1600
Removes the following from the root of the D9 template:
gilzow Jun 1, 2023
87ccd08
updates cron start command to match what is in the repo
gilzow Jun 1, 2023
6c9b4e6
updates app type to 8.1 to resolve composer dependency issues.
gilzow Jun 1, 2023
7c028de
updates wordpress-composer app config file properties to match docs
gilzow Jun 1, 2023
59ad87c
re-arranges wordpress-bedrock app config file properties to match doc…
gilzow Jun 1, 2023
546fa19
rearranges wordpress-vanilla app config properties to match docs and …
gilzow Jun 1, 2023
4eeaa3c
Removes the following from the root of the D9-govcms9 template:
gilzow Jun 2, 2023
1b33108
rearranges platform.app.config properties to match docs, adds inline …
gilzow Jun 2, 2023
122f1d1
bumps php version from 8.0 to 8.1
gilzow Jun 21, 2023
0f765e0
In govCMS9 - for some reason, lcobucci/clock decided to bump the min…
gilzow Jun 21, 2023
e5fb675
Merge branch 'master' into enhance/846b-tb-cleanup-phase1dot5
gilzow Jul 5, 2023
7084e22
Update .platform.app.yaml
flovntp Jul 7, 2023
a0872ab
Merge pull request #885 from platformsh/flovntp-patch-1
gilzow Jul 7, 2023
ff3f1f9
Merge branch 'master' into enhance/846b-tb-cleanup-phase1dot5
gilzow Jul 17, 2023
b3e6bb2
Merge branch 'enhance/846b-tb-cleanup-phase1dot5' of github.com:platf…
gilzow Jul 17, 2023
96021a9
reformats config files for wagtail template
gilzow Jul 18, 2023
271e9a2
removes all non configuration and package management files.
gilzow Jul 18, 2023
6539067
updates lock file to match what is in repo
gilzow Jul 18, 2023
28474eb
updates syllius config files to match order from docs, adds comments.
gilzow Jul 18, 2023
26d78d2
Merge branch 'master' into enhance/846b-tb-cleanup-phase1dot5
gilzow Jul 18, 2023
2954bf9
syncs configuration files from wagtail repo and the configuration fil…
gilzow Jul 18, 2023
fd6e4e0
updates strapi config file to match current in template repository
gilzow Jul 19, 2023
f7213fc
updates strapi package.json file to match current in template repository
gilzow Jul 19, 2023
13d3c94
updates strapi yarn.lock file to match current in template repository
gilzow Jul 19, 2023
a776e42
updates platform.sh configuration files to match order from docs, add…
gilzow Jul 19, 2023
95ebf75
removes all non-psh configuration and package management files from s…
gilzow Jul 19, 2023
36a81b7
updates platform.sh configuration files to match order from docs, add…
gilzow Jul 19, 2023
1c2a788
removes non-psh config files, and non-package management files from p…
gilzow Jul 19, 2023
42be400
sycs psh config file from nuxtjs template repo
gilzow Jul 19, 2023
dcd257e
updates platform.sh configuration files to match order from docs, add…
gilzow Jul 19, 2023
aef87f9
removes non-psh config file (.gitignore) from template (nuxtjs) files…
gilzow Jul 20, 2023
8f476c3
adds inline docs for source and source:operations properties
gilzow Jul 20, 2023
bef66cd
removes README from nuxtjs template
gilzow Jul 20, 2023
4562e2f
syncs nextjs psh config with nextjs psh repo
gilzow Jul 20, 2023
458b123
removes all nonpsh-config/package management files from nextjs
gilzow Jul 20, 2023
ce1be0d
syncs yarn.lock with current in source repo
gilzow Jul 20, 2023
870153a
rearranges property order, adds inline documentation to nextjs psh co…
gilzow Jul 20, 2023
c80f354
removes package-lock.json since current nextjs template repo doesnt c…
gilzow Jul 20, 2023
59c2fd2
syncs psh config with current in laravel template repo
gilzow Jul 20, 2023
7888cfa
removes non-psh config and package management files
gilzow Jul 20, 2023
c6f94b6
adds composer.json as it was missing in template builder
gilzow Jul 20, 2023
e5bc034
adds composer.json/lock as they were missing in template builder
gilzow Jul 20, 2023
4edac55
removes composer.lock as it was causing version conflicts
gilzow Jul 20, 2023
a1f11de
removes all non-psh config / package management files from koa template
gilzow Jul 20, 2023
ee78b2c
deletes non-psh-config / non-package management files from gin template
gilzow Jul 21, 2023
60e236c
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 21, 2023
568d11f
deletes non-psh-config / non-package management files from flask temp…
gilzow Jul 21, 2023
ad0e7e6
removes pipfile and pipfile.lock as they are no longer in the templat…
gilzow Jul 21, 2023
654c088
adds poetry.lock from template repo
gilzow Jul 21, 2023
3eb7d6a
syncs files from template repo into template builder
gilzow Jul 21, 2023
274df83
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 21, 2023
4d8280b
removes blackfire as that isnt in the current template repository
gilzow Jul 21, 2023
0a72cb6
syncs files from fastapi repository
gilzow Jul 21, 2023
a92a005
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 21, 2023
0d439f0
deletes non-psh-config / non-package management files from express te…
gilzow Jul 21, 2023
ae45760
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 21, 2023
0f6cb0d
deletes non-psh-config / non-package management files from echo template
gilzow Jul 21, 2023
3f28c2a
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 21, 2023
04b58d2
syncs go.mod with version in template repo
gilzow Jul 21, 2023
db72e85
deletes non-psh-config / non-package management files from beego temp…
gilzow Jul 21, 2023
88f7e1e
updates beego go.mod file with current from template repo
gilzow Jul 21, 2023
b545174
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 21, 2023
aa5aa20
beego build failed with error
gilzow Jul 21, 2023
c1ced1e
ok, now beego fails and complains about needing to do
gilzow Jul 21, 2023
87e690f
deletes non-psh-config / non-package management files from directus t…
gilzow Jul 21, 2023
269ccf1
syncs package.json from directus repo
gilzow Jul 21, 2023
a0ce77c
syncs config files from directus repo to here
gilzow Jul 21, 2023
710838b
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 21, 2023
55593aa
build fails with //go:build comment without // +build comment
gilzow Jul 22, 2023
673af7d
deletes non-psh-config / non-package management files from django4 te…
gilzow Jul 22, 2023
7dd6f70
syncs files with django4 repository
gilzow Jul 22, 2023
b267846
syncs files with django4 repository
gilzow Jul 22, 2023
e1884f0
deletes non-psh-config / non-package management files from django3 te…
gilzow Jul 22, 2023
78830d9
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 22, 2023
330590c
corrects comment block in routes.yaml for beego template
gilzow Jul 24, 2023
90807b8
corrects comment block in routes.yaml for django3 template
gilzow Jul 24, 2023
1f3f2b9
corrects comment block in routes.yaml for django4 template
gilzow Jul 24, 2023
3ba26f3
corrects comment block in routes.yaml for echo template
gilzow Jul 24, 2023
41c86a5
corrects comment block in routes.yaml for express template
gilzow Jul 24, 2023
9612e1a
corrects comment block in routes.yaml for fastapi template
gilzow Jul 24, 2023
591d176
corrects comment block in routes.yaml for directus template
gilzow Jul 24, 2023
482a3c3
moves common functionality needed between Remote metaclasses and some…
gilzow Jul 24, 2023
8be3517
inherits common README handling funcitonality from ReadmeMixin
gilzow Jul 24, 2023
b2c7c66
adds yaml setting of 2 spaces
gilzow Jul 24, 2023
18554a5
updates nuxt class to use the new v3 way of creating a nuxt app.
gilzow Jul 26, 2023
f737e54
removes other source operation commands as they are no longer needed
gilzow Jul 26, 2023
fe52533
removes .gitignore from magento
gilzow Jul 26, 2023
180a351
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 26, 2023
323a6a3
adds db update command to deploy hook for directus template
gilzow Jul 27, 2023
f9d8aaf
renames magento.py to magento-archived.py as mangento no longer needs…
gilzow Jul 27, 2023
9b394ca
Removes the remaining package management files from template builder …
gilzow Jul 27, 2023
47cb24e
latest laravel update now needs php 8.1
gilzow Jul 27, 2023
85c2621
re-resyncing changes from django3 repo back into template builder
gilzow Jul 27, 2023
391f27a
reorders properties and adds inline documentation to psh-config files…
gilzow Jul 27, 2023
4eb7d24
updates gatsby to supported version of node (18)
gilzow Jul 27, 2023
6e7bf73
removes package management files from django4 template
gilzow Jul 27, 2023
7267ff2
updates koa to a supported version of node (18)
gilzow Jul 27, 2023
d0f976c
updates nextjs to a supported version of node (18)
gilzow Jul 27, 2023
37fbc06
updates pyramid template to 3.9 to match constraints in Pipfile
gilzow Jul 27, 2023
fbb527d
Updates node version in Express template to supported version (18)
gilzow Jul 27, 2023
3f2fb12
bumps nodes version to 18 in strapi4 template
gilzow Jul 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ trim_trailing_whitespace = true

[Makefile]
indent_style = tab

[*.yaml]
indent_style = space
indent_size = 2
4 changes: 2 additions & 2 deletions dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
from project.gatsby import Gatsby
from project.hugo import Hugo
from project.laravel import Laravel
from project.magento import Magento2ce
# from project.magento import Magento2ce
from project.pimcore import Pimcore
from project.laravel import Laravel
from project.magento import Magento2ce
# from project.magento import Magento2ce
from project.mattermost import Mattermost
from project.mautic import Mautic
from project.nextjs import Nextjs
Expand Down
28 changes: 28 additions & 0 deletions project/ReadmeMixin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
class ReadmeMixin:
readMeFileName = "README"
readMeFileExt = "md"
readMeUpstreamFile = "_UPSTREAM"
readMePSHFile = "_PSH"

def rename_psh_readme(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixin!

return 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "Moving {1}.{2} to {1}{3}.{2}"; mv "{1}.{2}" "{1}{3}.{2}";' \
'fi;'.format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile)

def rename_psh_readme_back(self):
return 'cd {0} && if [[ -f "{1}{3}.{2}" ]]; then echo "Moving our {1}{3}.{2} back to {1}.{2}";mv "{1}{3}.{2}" '\
'"{1}.{2}";fi;'.format(self.builddir,self.readMeFileName,self.readMeFileExt,self.readMePSHFile)

# return 'cd {0} && if [[ -f "{1}{3}.{2}" ]]; then echo "Moving our {1}{3}.{2} back to {1}.{2}";mv "{1}{3}.{2}" '\
# '"{1}.{2}";git add {1}.{2};git commit -m "Committing our {1}.{2}";fi;'.format(self.builddir,
# self.readMeFileName,
# self.readMeFileExt,
# self.readMePSHFile)

def rename_upstream_readme(self):
return 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "moving upstream {1}.{2} to {1}{3}.{2}";mv "{1}.{2}" "{1}{' \
'3}.{2}";fi;'.format(self.builddir,self.readMeFileName,self.readMeFileExt,self.readMeUpstreamFile)
# return 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "moving upstream {1}.{2} to {1}{3}.{2}";mv "{1}.{2}" "{1}{' \
# '3}.{2}"; git add "{1}{3}.{2}";git commit -m "renamed {1} to {1}{3}";fi;'.format(self.builddir,
# self.readMeFileName,
# self.readMeFileExt,
# self.readMeUpstreamFile)
2 changes: 1 addition & 1 deletion project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def init(self):
name = self.github_name
else:
name = self.name.replace('_', '-')
return ['git clone [email protected]:{2}/{0}.git {1}'.format(
return ['git clone --progress --verbose [email protected]:{2}/{0}.git {1}'.format(
name, self.builddir, self.template_org)
]

Expand Down
4 changes: 4 additions & 0 deletions project/drupal.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ def update(self):
'cd {0} && composer remove php {1}'.format(self.builddir,
self.composer_defaults().replace('--prefer-dist', '')),
# 'cd {0} && rm -rf web/profiles/govcms'.format(self.builddir),
# for some reason, lcobucci/clock decided to bump the min php version to 8.2 between version 3.0.0 and 3.1.0
# https://github.com/lcobucci/clock/releases/tag/3.1.0
# @todo for now locking to 3.0.0 until we upgrade this project to php 8.2
'cd {0} && composer require lcobucci/clock:3.0.0 {1}'.format(self.builddir, self.composer_defaults()),
]

@property
Expand Down
20 changes: 10 additions & 10 deletions project/magento.py → project/magento-archived.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ def magento_modify_composer(composer):
(self.modify_composer, [magento_modify_composer])
]

@property
def platformify(self):
extraIgnores = '--ignore-platform-req=ext-iconv --ignore-platform-req=ext-soap ' \
'--ignore-platform-req=ext-pdo_mysql '

return super(Magento2ce, self).platformify + [
'cd {0} && composer require magento/ece-tools magento/magento-cloud-components '
'magento/quality-patches -W '.format(self.builddir) + self.composer_defaults() + extraIgnores,
'cd {0} && composer update -W {1}'.format(self.builddir, self.composer_defaults() + extraIgnores),
]
# @property
# def platformify(self):
# extraIgnores = '--ignore-platform-req=ext-iconv --ignore-platform-req=ext-soap ' \
# '--ignore-platform-req=ext-pdo_mysql '
#
# return super(Magento2ce, self).platformify + [
# 'cd {0} && composer require magento/ece-tools magento/magento-cloud-components '
# 'magento/quality-patches -W '.format(self.builddir) + self.composer_defaults() + extraIgnores,
# 'cd {0} && composer update -W {1}'.format(self.builddir, self.composer_defaults() + extraIgnores),
# ]
33 changes: 25 additions & 8 deletions project/nuxtjs.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
from . import BaseProject
from project.ReadmeMixin import ReadmeMixin
import json
import os

class Nuxtjs(BaseProject):

class Nuxtjs(BaseProject, ReadmeMixin):
# Keeps package-lock.json out of repo. See notes.md (Yarn - Overwriting updateCommands) for more details.
updateCommands = {
'package.json': 'yarn upgrade'
}

@property
def update(self):

ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATEDIR = os.path.join(ROOTDIR, 'templates/nuxtjs')

Expand All @@ -25,6 +25,7 @@ def update(self):
"language": "js",
"pm": "yarn",
"ui": "none",
"template": "html",
"features": [],
"linter": [],
"test": "none",
Expand All @@ -39,22 +40,38 @@ def set_default(obj):
return list(obj)
raise TypeError

return [
actions = [
#just in case a previous update failed, our temp directory may still be around
'cd {0} && if [ -d "{1}" ]; then echo "removing previous {1} directory...";rm -rf {1};fi;'.format(TEMPLATEDIR,projectName),
super(Nuxtjs, self).rename_psh_readme(),
# Create a NuxtJS app using Yarn, since there's no dedicated upstream repo for it. Yarn prevents you
# from creating a new project in a nonempty dir, so the project is made in projectName before its
# contents are copied into builddir.
'cd {0} && npx create-nuxt-app --answers \"{1}\" {2}'.format(TEMPLATEDIR, json.dumps(createNuxtAppAnswers, default=set_default).replace('"', '\\"'), projectName),
# 'cd {0} && npx create-nuxt-app --answers \"{1}\" {2}'.format(TEMPLATEDIR,
# json.dumps(createNuxtAppAnswers,
# default=set_default).replace(
# '"', '\\"'), projectName),
'cd {0} && npx nuxi@latest init {1}'.format(TEMPLATEDIR,projectName),
# Disable telemtery so we are not asked for it when running the application the first time
'cd {0}/{1} && npx nuxt telemetry disable'.format(TEMPLATEDIR, projectName),
#'cd {0}/{1} && npx nuxt telemetry disable'.format(TEMPLATEDIR, projectName),
'cd {0} && rm -rf {1}/.git'.format(TEMPLATEDIR, projectName),
'cd {0} && cp -r {1}/{2}/* .'.format(self.builddir, TEMPLATEDIR, projectName),
'cd {0} && rm -rf {1}'.format(TEMPLATEDIR, projectName),
] + super(Nuxtjs, self).update
'echo "Going to delete the old readme_upstream..."',
'cd {0} && if [ -f "README_upstream.md" ]; then echo "deleting previous README_upstream"; rm README_upstream.md;fi;'.format(
self.builddir),
'echo "Going to rename the new README to README_UPSTREAM"',
super(Nuxtjs, self).rename_upstream_readme(),
super(Nuxtjs, self).rename_psh_readme_back(),
]

actions.extend(self.package_update_actions())

return actions

@property
def platformify(self):

return super(Nuxtjs, self).platformify + [
# Add dependencies.
'cd {0} && yarn add platformsh-config'.format(self.builddir),
]
]
34 changes: 16 additions & 18 deletions project/remote.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import subprocess

import packaging.version

from . import BaseProject
from project.ReadmeMixin import ReadmeMixin


class RemoteProject(BaseProject):
class RemoteProject(BaseProject, ReadmeMixin):
"""
Base class for projects that need to synchronize code with an upstream source.

Expand All @@ -21,11 +20,6 @@ class RemoteProject(BaseProject):
from which to pull. (If both are defined, `major_version` take precedence.)
"""

readMeFileName = "README"
readMeFileExt = "md"
readMeUpstreamFile = "_UPSTREAM"
readMePSHFile = "_PSH"

@property
def init(self):
return super(RemoteProject, self).init + [
Expand All @@ -37,13 +31,14 @@ def init(self):
def update(self):
actions = [
# If we have a readme file from the template repository, rename it so we can bring it back later
'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "Moving {1}.{2} to {1}{3}.{2}"; mv "{1}.{2}" "{1}{3}.{2}"; fi;'
.format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile),
# 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "Moving {1}.{2} to {1}{3}.{2}"; mv "{1}.{2}" "{1}{3}.{2}"; fi;'
# .format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile),
super(RemoteProject, self).rename_psh_readme(),
'cd {0} && git checkout {1}'.format(self.builddir, self.default_branch),
'cd {0} && git fetch --all --depth=2'.format(self.builddir),
'cd {0} && git fetch --all --tags'.format(self.builddir),
# now we need to handle our .github directory and files
'cd {0} && [ -d {1} ] && mv {1} {2}'.format(self.builddir,'.github','tmp.github')
'cd {0} && if [ -d {1} ]; then mv {1} {2};fi;'.format(self.builddir, '.github', 'tmp.github')
# Remove working directory files when updating from upstream, so that deletions get picked up.
# Disabled, because it was breaking Magento updates. Even though it was added to avoid breaking Magento updates.
# 'cd {0} && (find . -maxdepth 1 -not \( -path ./.git -o -path . \) -exec rm -rf {{}} \;)'.format(self.builddir),
Expand All @@ -68,24 +63,27 @@ def merge_from_upstream_tag():

# now we need to deal with the upstream README
actions.append(
'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "moving upstream {1}.{2} to {1}{3}.{2}";mv "{1}.{2}" "{1}'
'{3}.{2}"; git add "{1}{3}.{2}";git commit -m "renamed {1} to {1}{3}";fi;'
.format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMeUpstreamFile)
super(RemoteProject, self).rename_upstream_readme()
# 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "moving upstream {1}.{2} to {1}{3}.{2}";mv "{1}.{2}" "{1}'
# '{3}.{2}"; git add "{1}{3}.{2}";git commit -m "renamed {1} to {1}{3}";fi;'
# .format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMeUpstreamFile)
)

# and now our README
actions.append(
'cd {0} && if [[ -f "{1}{3}.{2}" ]]; then echo "Moving our {1}{3}.{2} back to {1}.{2}";mv "{1}{3}.{2}" "'
'{1}.{2}";git add {1}.{2};git commit -m "Commiting our {1}.{2}";fi;'
.format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile)
super(RemoteProject, self).rename_psh_readme_back()
# 'cd {0} && if [[ -f "{1}{3}.{2}" ]]; then echo "Moving our {1}{3}.{2} back to {1}.{2}";mv "{1}{3}.{2}" "'
# '{1}.{2}";git add {1}.{2};git commit -m "Commiting our {1}.{2}";fi;'
# .format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile)
)

# now if a .github directory was reintroduced from the upstream, delete it, and then if ours is present, rename
# it back to .github
actions.append(
# remove a .github directory that might have been brought in from upstream
# @todo should we loop through all possible directories/files that may need to be removed?
'cd {0}; if [ -d {1} ]; then rm -rf {1};fi; if [ -d {2} ]; then mv {2} {1};fi;'.format(self.builddir, '.github', 'tmp'
'cd {0}; if [ -d {1} ]; then rm -rf {1};fi; if [ -d {2} ]; then mv {2} {1};fi;'.format(self.builddir,
'.github', 'tmp'
'.github')
)
# Do this last so it picks up all changes from above.
Expand Down
4 changes: 3 additions & 1 deletion project/wordpress.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def platformify(self):
# Release the tar and cleanup.
'cd {0} && tar -xvf {1}.tar.gz && rm {1}.tar.gz'.format(self.builddir, self.install_dir),
# Move Platform.sh files into `wordpress`.
'cd {0} && mv wp-config.php {1} && mv wp-cli.yml {1}'.format(self.builddir, self.install_dir),
# No longer needed as our wp-config and wp-cli.yml files are already in the wordpress directory from the
# template repository
# 'cd {0} && mv wp-config.php {1} && mv wp-cli.yml {1}'.format(self.builddir, self.install_dir),
]


Expand Down
2 changes: 0 additions & 2 deletions templates/beego/files/.gitignore

This file was deleted.

94 changes: 62 additions & 32 deletions templates/beego/files/.platform.app.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,77 @@
# This file describes an application. You can have multiple applications
# in the same project.
#
# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html
# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html

# The name of this app. Must be unique within a project.
# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
# with the app.
name: app

# The runtime the application uses.
# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
type: golang:1.16

# The hooks executed at various points in the lifecycle of the application.
hooks:
build: |
# Modify this line if you want to build differently or use an alternate name for your executable.
go build -o bin/app

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
# More information: https://docs.platform.sh/create-apps/app-reference.html#relationships
relationships:
database: "db:mysql"
database: "db:mysql"

# The configuration of app when it is exposed to the web.
web:
upstream:
socket_family: tcp
protocol: http

commands:
# If you change the build output in the build hook above, update this line as well.
start: ./bin/app

locations:
/:
# Route all requests to the Go app, unconditionally.
# If you want some files served directly by the web server without hitting Go, see
# https://docs.platform.sh/configuration/app/web.html
allow: false
passthru: true

# The size of the persistent disk of the application (in MB).
# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 1024

# The web key configures the web server running in front of your app.
# More information: https://docs.platform.sh/create-apps/app-reference.html#web
web:
# More information: https://docs.platform.sh/configuration/app-containers.html#upstream
upstream:
# Whether your app should speak to the webserver via TCP or Unix socket. Defaults to tcp
# More information: https://docs.platform.sh/create-apps/app-reference.html#where-to-listen
socket_family: tcp
protocol: http

# Commands are run once after deployment to start the application process.
# More information: https://docs.platform.sh/create-apps/app-reference.html#web-commands
commands:
# The command to launch your app. If it terminates, it’s restarted immediately.
# If you change the build output in the build hook update this line as well.
start: ./bin/app

# Each key in locations is a path on your site with a leading /.
# More information: https://docs.platform.sh/create-apps/app-reference.html#locations
locations:
/:
# Whether to allow serving files which don’t match a rule.
# Route all requests to the Go app, unconditionally.
# If you want some files served directly by the web server without hitting Go, see
# https://docs.platform.sh/configuration/app/web.html
allow: false
# Whether to forward disallowed and missing resources from this location to the app. A string is a path
# with a leading / to the controller, such as /index.php.
passthru: true

# Hooks allow you to customize your code/environment as the project moves through the build and deploy stages
# More information: https://docs.platform.sh/create-apps/app-reference.html#hooks
hooks:
# The build hook is run after any build flavor.
# More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
build: |
# Modify this line if you want to build differently or use an alternate name for your executable.
go build -o bin/app

# Information on the app's source code and operations that can be run on it.
# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
######################################################################################################################
## ##
## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
## https://github.com/platformsh/source-operations ##
## ##
## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
## ##
######################################################################################################################
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0

13 changes: 7 additions & 6 deletions templates/beego/files/.platform/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

# The routes of the project.
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.

# More information: https://docs.platform.sh/define-routes.html
"https://{default}/":
type: upstream
upstream: "app:http"
type: upstream
upstream: "app:http"

# A basic redirect definition
# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}/":
type: redirect
to: "https://{default}/"
type: redirect
to: "https://{default}/"
Loading