Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/platformify/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
assets := &vendorization.VendorAssets{
Binary: "platform",
ConfigFlavor: "platform",
DocsBaseURL: "https://docs.platform.sh/",
DocsBaseURL: "https://docs.upsun.com/anchors/fixed",
EnvPrefix: "PLATFORM",
ServiceName: "Platform.sh",
Use: "platformify",
Expand Down
2 changes: 1 addition & 1 deletion cmd/upsunify/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
assets := &vendorization.VendorAssets{
Binary: "upsun",
ConfigFlavor: "upsun",
DocsBaseURL: "https://docs.upsun.com",
DocsBaseURL: "https://docs.upsun.com/anchors",
EnvPrefix: "PLATFORM",
ServiceName: "Upsun",
Use: "upsunify",
Expand Down
46 changes: 23 additions & 23 deletions platformifier/templates/generic/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
name: "{{ .Name }}"

# The runtime the application uses.
# Complete list of available runtimes: {{ .Assets.Docs.AppReference }}#types
# Complete list of available runtimes: {{ .Assets.Docs.AppReference }}type/
type: "{{ .Type }}"

# How many resources to devote to the app. Defaults to AUTO in production environments.
# More information: {{ .Assets.Docs.AppReference }}#sizes
# More information: {{ .Assets.Docs.AppReference }}sizes/
# size:

# 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 {{ .Assets.EnvPrefix }}_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
# More information: {{ .Assets.Docs.AppReference }}#relationships
# More information: {{ .Assets.Docs.AppReference }}relationships/
{{ if .Relationships -}}
relationships:
{{ range $key, $value := .Relationships }}
Expand All @@ -35,7 +35,7 @@ disk: {{ .Disk }}
{{- end }}

# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
# More information: {{ .Assets.Docs.AppReference }}#mounts
# More information: {{ .Assets.Docs.AppReference }}mounts/
{{ if .Mounts -}}
mounts:
{{ range $key, $value := .Mounts -}}
Expand All @@ -52,10 +52,10 @@ mounts:
{{- end }}

# The web key configures the web server running in front of your app.
# More information: {{ .Assets.Docs.AppReference }}#web
# More information: {{ .Assets.Docs.AppReference }}web/
web:
# Commands are run once after deployment to start the application process.
# More information: {{ .Assets.Docs.AppReference }}#web-commands
# More information: {{ .Assets.Docs.AppReference }}web/commands/
{{- if .WebCommand }}
commands:
# The command to launch your app. If it terminates, it’s restarted immediately.
Expand All @@ -67,7 +67,7 @@ web:
# You can use the $PORT or the $SOCKET environment variable depending on the socket family of your upstream
{{- if eq "php" .Runtime }}
# PHP applications run PHP-fpm by default
# Read about alternative commands here: {{ .Assets.Docs.PHP }}#alternate-start-commands
# Read about alternative commands here: {{ .Assets.Docs.PHP }}alternate-start-commands/
{{- end }}
# start: echo 'Put your start command here'
{{- end }}
Expand All @@ -76,11 +76,11 @@ web:
# For PHP, the defaults are configured for PHP-FPM and shouldn't need adjustment.
{{- end }}
# Whether your app should speak to the webserver via TCP or Unix socket. Defaults to tcp
# More information: {{ .Assets.Docs.AppReference }}#where-to-listen
# More information: {{ .Assets.Docs.AppReference }}web/upstream/socket-family/
{{- if .SocketFamily }}
upstream:
# Whether your app should speak to the webserver via TCP or Unix socket. Defaults to tcp
# More information: {{ .Assets.Docs.AppReference }}#where-to-listen
# More information: {{ .Assets.Docs.AppReference }}web/upstream/socket-family/
socket_family: {{ .SocketFamily }}
{{- else }}
# upstream:
Expand All @@ -89,7 +89,7 @@ web:

{{- if .Locations }}
# Each key in locations is a path on your site with a leading /.
# More information: {{ .Assets.Docs.AppReference }}#locations
# More information: {{ .Assets.Docs.AppReference }}web/locations/
locations:
{{ range $key, $value := .Locations -}}
"{{ $key }}":
Expand All @@ -113,18 +113,18 @@ web:
{{ end }}

# Alternate copies of the application to run as background processes.
# More information: {{ .Assets.Docs.AppReference }}#workers
# More information: {{ .Assets.Docs.AppReference }}workers/
# workers:

# The timezone for crons to run. Format: a TZ database name. Defaults to UTC, which is the timezone used for all logs
# no matter the value here. More information: {{ .Assets.Docs.TimeZone }}
# timezone: <time-zone>

# Access control for roles accessing app environments.
# More information: {{ .Assets.Docs.AppReference }}#access
# More information: {{ .Assets.Docs.AppReference }}access/
# access:

# Variables to control the environment. More information: {{ .Assets.Docs.AppReference }}#variables
# Variables to control the environment. More information: {{ .Assets.Docs.AppReference }}variables/
{{ if .Environment -}}
variables:
env:
Expand All @@ -148,11 +148,11 @@ variables:
{{- end }}
{{- end }}

# Outbound firewall rules for the application. More information: {{ .Assets.Docs.AppReference }}#firewall
# Outbound firewall rules for the application. More information: {{ .Assets.Docs.AppReference }}firewall/
# firewall:

# Specifies a default set of build tasks to run. Flavors are language-specific.
# More information: {{ .Assets.Docs.AppReference }}#build
# More information: {{ .Assets.Docs.AppReference }}build/
{{ if .BuildFlavor -}}
build:
flavor: {{ .BuildFlavor }}
Expand All @@ -164,7 +164,7 @@ build:
# Installs global dependencies as part of the build process. They’re independent of your app’s dependencies and
# are available in the PATH during the build process and in the runtime environment. They’re installed before
# the build hook runs using a package manager for the language.
# More information: {{ .Assets.Docs.AppReference }}#dependencies
# More information: {{ .Assets.Docs.AppReference }}dependencies/
{{ if .Dependencies -}}
dependencies:
{{- range $depGroupKey, $depGroupValue := .Dependencies }}
Expand Down Expand Up @@ -192,10 +192,10 @@ dependencies:
{{- end }}

# Hooks allow you to customize your code/environment as the project moves through the build and deploy stages
# More information: {{ .Assets.Docs.AppReference }}#hooks
# More information: {{ .Assets.Docs.AppReference }}hooks/
hooks:
# The build hook is run after any build flavor.
# More information: {{ .Assets.Docs.Hooks }}#build-hook
# More information: {{ .Assets.Docs.Hooks }}compare/build/
build: |
set -eux
{{ range $step := .BuildSteps }}
Expand All @@ -205,7 +205,7 @@ hooks:
# echo 'I am a build step'
{{ end }}
# The deploy hook is run after the app container has been started, but before it has started accepting requests.
# More information: {{ .Assets.Docs.Hooks }}#deploy-hook
# More information: {{ .Assets.Docs.Hooks }}compare/deploy/
deploy: |
set -eux
{{ range $deploycmd := .DeployCommand }}
Expand All @@ -215,15 +215,15 @@ hooks:
{{ end }}

# The post_deploy hook is run after the app container has been started and after it has started accepting requests.
# More information: {{ .Assets.Docs.Hooks }}#deploy-hook
# More information: {{ .Assets.Docs.Hooks }}compare/post-deploy/
# post_deploy: |

# Scheduled tasks for the app.
# More information: {{ .Assets.Docs.AppReference }}#crons
# More information: {{ .Assets.Docs.AppReference }}crons/
# crons:

# Customizations to your PHP or Lisp runtime. More information: {{ .Assets.Docs.AppReference }}#runtime
# Customizations to your PHP or Lisp runtime. More information: {{ .Assets.Docs.AppReference }}runtime/
# runtime:

# More information: {{ .Assets.Docs.AppReference }}#additional-hosts
# More information: {{ .Assets.Docs.AppReference }}additional-hosts/
# additional_hosts:
2 changes: 1 addition & 1 deletion platformifier/templates/generic/.platform/routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
upstream: "{{ .Name }}:http"

# A basic redirect definition
# More information: {{ .Assets.Docs.Routes }}#basic-redirect-definition
# More information: {{ .Assets.Docs.Routes }}examples/redirect/
"https://www.{{ "{default}" }}":
type: redirect
to: "https://{{ "{default}" }}/"
2 changes: 1 addition & 1 deletion platformifier/templates/generic/.platform/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Each service listed will be deployed
# to power your {{ .Assets.ServiceName }} project.
# More information: {{ .Assets.Docs.Services }}
# Full list of available services: {{ .Assets.Docs.Services }}#available-services
# Full list of available services: {{ .Assets.Docs.Services }}available/
{{- if .Services -}}
{{- range $value := .Services }}
{{ $value.Name }}:
Expand Down
50 changes: 25 additions & 25 deletions platformifier/templates/upsun/.upsun/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ applications:
root: "{{ .ApplicationRoot }}"

# The runtime the application uses.
# Complete list of available runtimes: {{ .Assets.Docs.AppReference }}#types
# Complete list of available runtimes: {{ .Assets.Docs.AppReference }}type/
type: "{{ .Type }}"

# Choose which container profile (ratio CPU+RAM) your app will use. Default value comes from the image itself.
# More information: https://docs.upsun.com/manage-resources/adjust-resources.html#adjust-a-container-profile
# More information: https://docs.upsun.com/anchors/resources/manage/configuration/profiles/adjust/
# container_profile:

# 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 {{ .Assets.EnvPrefix }}_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
# More information: {{ .Assets.Docs.AppReference }}#relationships
# More information: {{ .Assets.Docs.AppReference }}relationships/
{{ if .Relationships -}}
relationships:
{{ range $key, $value := .Relationships }}
Expand All @@ -29,7 +29,7 @@ applications:
{{ end }}

# Mounts define directories that are writable after the build is complete.
# More information: {{ .Assets.Docs.AppReference }}#mounts
# More information: {{ .Assets.Docs.AppReference }}mounts/
{{ if .Mounts -}}
mounts:
{{ range $key, $value := .Mounts -}}
Expand All @@ -47,10 +47,10 @@ applications:
{{- end }}

# The web key configures the web server running in front of your app.
# More information: {{ .Assets.Docs.AppReference }}#web
# More information: {{ .Assets.Docs.AppReference }}web/
web:
# Commands are run once after deployment to start the application process.
# More information: {{ .Assets.Docs.AppReference }}#web-commands
# More information: {{ .Assets.Docs.AppReference }}web/commands/
{{- if .WebCommand }}
commands:
# The command to launch your app. If it terminates, it’s restarted immediately.
Expand All @@ -62,7 +62,7 @@ applications:
# You can use the $PORT or the $SOCKET environment variable depending on the socket family of your upstream
{{- if eq "php" .Runtime }}
# PHP applications run PHP-fpm by default
# Read about alternative commands here: {{ .Assets.Docs.PHP }}#alternate-start-commands
# Read about alternative commands here: {{ .Assets.Docs.PHP }}alternate-start-commands/
{{- end }}
# start: echo 'Put your start command here'
{{- end }}
Expand All @@ -71,11 +71,11 @@ applications:
# For PHP, the defaults are configured for PHP-FPM and shouldn't need adjustment.
{{- end }}
# Whether your app should speak to the webserver via TCP or Unix socket. Defaults to tcp
# More information: {{ .Assets.Docs.AppReference }}#where-to-listen
# More information: {{ .Assets.Docs.AppReference }}web/upstream/socket-family/
{{- if .SocketFamily }}
upstream:
# Whether your app should speak to the webserver via TCP or Unix socket. Defaults to tcp
# More information: {{ .Assets.Docs.AppReference }}#where-to-listen
# More information: {{ .Assets.Docs.AppReference }}web/upstream/socket-family/
socket_family: {{ .SocketFamily }}
{{- else }}
# upstream:
Expand All @@ -84,7 +84,7 @@ applications:

{{- if .Locations }}
# Each key in locations is a path on your site with a leading /.
# More information: {{ .Assets.Docs.AppReference }}#locations
# More information: {{ .Assets.Docs.AppReference }}web/locations/
locations:
{{ range $key, $value := .Locations -}}
"{{ $key }}":
Expand All @@ -108,18 +108,18 @@ applications:
{{ end }}

# Alternate copies of the application to run as background processes.
# More information: {{ .Assets.Docs.AppReference }}#workers
# More information: {{ .Assets.Docs.AppReference }}workers/
# workers:

# The timezone for crons to run. Format: a TZ database name. Defaults to UTC, which is the timezone used for all logs
# no matter the value here. More information: {{ .Assets.Docs.TimeZone }}
# timezone: <time-zone>

# Access control for roles accessing app environments.
# More information: {{ .Assets.Docs.AppReference }}#access
# More information: {{ .Assets.Docs.AppReference }}access/
# access:

# Variables to control the environment. More information: {{ .Assets.Docs.AppReference }}#variables
# Variables to control the environment. More information: {{ .Assets.Docs.AppReference }}variables/
{{ if .Environment -}}
variables:
env:
Expand All @@ -143,11 +143,11 @@ applications:
{{- end }}
{{- end }}

# Outbound firewall rules for the application. More information: {{ .Assets.Docs.AppReference }}#firewall
# Outbound firewall rules for the application. More information: {{ .Assets.Docs.AppReference }}firewall/
# firewall:

# Specifies a default set of build tasks to run. Flavors are language-specific.
# More information: {{ .Assets.Docs.AppReference }}#build
# More information: {{ .Assets.Docs.AppReference }}build/
{{ if .BuildFlavor -}}
build:
flavor: {{ .BuildFlavor }}
Expand All @@ -159,7 +159,7 @@ applications:
# Installs global dependencies as part of the build process. They’re independent of your app’s dependencies and
# are available in the PATH during the build process and in the runtime environment. They’re installed before
# the build hook runs using a package manager for the language.
# More information: {{ .Assets.Docs.AppReference }}#dependencies
# More information: {{ .Assets.Docs.AppReference }}dependencies/
{{ if .Dependencies -}}
dependencies:
{{- range $key, $value := .Dependencies }}
Expand Down Expand Up @@ -187,10 +187,10 @@ applications:
{{- end }}

# Hooks allow you to customize your code/environment as the project moves through the build and deploy stages
# More information: {{ .Assets.Docs.AppReference }}#hooks
# More information: {{ .Assets.Docs.AppReference }}hooks/
hooks:
# The build hook is run after any build flavor.
# More information: {{ .Assets.Docs.Hooks }}#build-hook
# More information: {{ .Assets.Docs.Hooks }}compare/build/
build: |
set -eux
{{ range $step := .BuildSteps }}
Expand All @@ -200,7 +200,7 @@ applications:
# echo 'I am a build step'
{{ end }}
# The deploy hook is run after the app container has been started, but before it has started accepting requests.
# More information: {{ .Assets.Docs.Hooks }}#deploy-hook
# More information: {{ .Assets.Docs.Hooks }}compare/deploy/
deploy: |
set -eux
{{ range $deploycmd := .DeployCommand }}
Expand All @@ -210,25 +210,25 @@ applications:
{{ end }}

# The post_deploy hook is run after the app container has been started and after it has started accepting requests.
# More information: {{ .Assets.Docs.Hooks }}#deploy-hook
# More information: {{ .Assets.Docs.Hooks }}compare/post-deploy/
# post_deploy: |

# Scheduled tasks for the app.
# More information: {{ .Assets.Docs.AppReference }}#crons
# More information: {{ .Assets.Docs.AppReference }}crons/
# crons:

# Customizations to your PHP or Lisp runtime. More information: {{ .Assets.Docs.AppReference }}#runtime
# Customizations to your PHP or Lisp runtime. More information: {{ .Assets.Docs.AppReference }}runtime/
# runtime:

# More information: {{ .Assets.Docs.AppReference }}#additional-hosts
# More information: {{ .Assets.Docs.AppReference }}additional-hosts/
# additional_hosts:

# The services of the project.
#
# Each service listed will be deployed
# to power your {{ .Assets.ServiceName }} project.
# More information: {{ .Assets.Docs.Services }}
# Full list of available services: {{ .Assets.Docs.Services }}#available-services
# Full list of available services: {{ .Assets.Docs.Services }}available/
{{- if .Services }}
services:
{{ range $value := .Services }}
Expand All @@ -252,7 +252,7 @@ routes:
type: upstream
upstream: "{{ .Name }}:http"
# A basic redirect definition
# More information: {{ .Assets.Docs.Routes }}#basic-redirect-definition
# More information: {{ .Assets.Docs.Routes }}examples/redirect/
"https://www.{{ "{default}" }}":
type: redirect
to: "https://{{ "{default}" }}/"
Loading
Loading