mirror of https://github.com/Squidex/squidex.git
committed by
GitHub
21 changed files with 380 additions and 99 deletions
@ -1,44 +0,0 @@ |
|||
name: Marketplace - Heroku |
|||
concurrency: marketplace-heroku |
|||
|
|||
on: |
|||
release: |
|||
types: [ released ] |
|||
|
|||
jobs: |
|||
validate: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Checkout Repository |
|||
uses: actions/checkout@v2 |
|||
|
|||
- name: Validate Template |
|||
if: false |
|||
uses: hashicorp/packer-github-actions@master |
|||
with: |
|||
command: validate |
|||
arguments: -syntax-only |
|||
target: heroku.pkr.hcl |
|||
working-directory: packer/ |
|||
|
|||
publish: |
|||
needs: validate |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Checkout Repository |
|||
uses: actions/checkout@v2 |
|||
|
|||
- name: Inject slug/short variables |
|||
uses: rlespinasse/github-slug-action@v3.x |
|||
|
|||
- name: Build |
|||
if: false |
|||
uses: hashicorp/packer-github-actions@master |
|||
with: |
|||
command: build |
|||
arguments: "-color=false -on-error=abort" |
|||
target: heroku.pkr.hcl |
|||
env: |
|||
PACKER_LOG: 1 |
|||
PKR_VAR_squidex_version: "${{ env.GITHUB_REF_SLUG }}" |
|||
working-directory: packer/ |
|||
@ -1,44 +0,0 @@ |
|||
name: Marketplace - Render |
|||
concurrency: marketplace-render |
|||
|
|||
on: |
|||
release: |
|||
types: [ released ] |
|||
|
|||
jobs: |
|||
validate: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Checkout Repository |
|||
uses: actions/checkout@v2 |
|||
|
|||
- name: Validate Template |
|||
if: false |
|||
uses: hashicorp/packer-github-actions@master |
|||
with: |
|||
command: validate |
|||
arguments: -syntax-only |
|||
target: render.pkr.hcl |
|||
working-directory: packer/ |
|||
|
|||
publish: |
|||
needs: validate |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Checkout Repository |
|||
uses: actions/checkout@v2 |
|||
|
|||
- name: Inject slug/short variables |
|||
uses: rlespinasse/github-slug-action@v3.x |
|||
|
|||
- name: Build |
|||
if: false |
|||
uses: hashicorp/packer-github-actions@master |
|||
with: |
|||
command: build |
|||
arguments: "-color=false -on-error=abort" |
|||
target: render.pkr.hcl |
|||
env: |
|||
PACKER_LOG: 1 |
|||
PKR_VAR_squidex_version: "${{ env.GITHUB_REF_SLUG }}" |
|||
working-directory: packer/ |
|||
@ -0,0 +1,71 @@ |
|||
{ |
|||
"name": "Squidex", |
|||
"description": "Headless CMS and Content Managment Hub", |
|||
"website": "https://squidex.io/", |
|||
"repository": "https://github.com/Squidex/squidex", |
|||
"logo": "https://avatars.githubusercontent.com/u/25371797?s=200&v=4", |
|||
"success_url": "/", |
|||
"env": { |
|||
"DOMAIN": { |
|||
"description": "Domain name", |
|||
"value": "squidex.example.com" |
|||
}, |
|||
"MONGO_USERNAME": { |
|||
"description": "Mongo Username, follow https://devcenter.heroku.com/articles/ormongo#open-the-dashboard to create a database named Squidex and then edit the deployment to reflect the credentials you used", |
|||
"value": "Squidex" |
|||
}, |
|||
"MONGO_PASSWORD": { |
|||
"description": "Mongo Password (see MONGO_USERNAME)", |
|||
"value": "Squidex123" |
|||
}, |
|||
"EVENTSTORE__TYPE": { |
|||
"description": "EventStore Type", |
|||
"value": "MongoDB" |
|||
}, |
|||
"IDENTITY__ADMINEMAIL": { |
|||
"description": "Admin Email", |
|||
"value": "squidex@example.com" |
|||
}, |
|||
"IDENTITY__ADMINPASSWORD": { |
|||
"description": "Admin Password", |
|||
"generator": "secret" |
|||
}, |
|||
"IDENTITY__GOOGLECLIENT": { |
|||
"description": "Google Client ID", |
|||
"required": false |
|||
}, |
|||
"IDENTITY__GOOGLESECRET": { |
|||
"description": "Google Secret", |
|||
"required": false |
|||
}, |
|||
"IDENTITY__GITHUBCLIENT": { |
|||
"description": "GitHub Client ID", |
|||
"required": false |
|||
}, |
|||
"IDENTITY__GITHUBSECRET": { |
|||
"description": "GitHub Secret", |
|||
"required": false |
|||
}, |
|||
"IDENTITY__MICROSOFTCLIENT": { |
|||
"description": "Microsoft Client ID", |
|||
"required": false |
|||
}, |
|||
"IDENTITY__MICROSOFTSECRET": { |
|||
"description": "Microsoft Secret", |
|||
"required": false |
|||
} |
|||
}, |
|||
"formation": { |
|||
"web": { |
|||
"quantity": 1, |
|||
"size": "standard-1x" |
|||
} |
|||
}, |
|||
"addons": [ |
|||
{ |
|||
"plan": "ormongo:2-mmap", |
|||
"as": "MONGO" |
|||
} |
|||
], |
|||
"stack": "container" |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
build: |
|||
docker: |
|||
web: packer/heroku/squidex/Dockerfile |
|||
@ -0,0 +1,70 @@ |
|||
variable "squidex_version" { |
|||
type = string |
|||
default = "5.7.0" |
|||
} |
|||
|
|||
variable "subscription_id" { |
|||
type = string |
|||
default = "${env("AZURE_SUBSCRIPTION_ID")}" |
|||
} |
|||
|
|||
variable "client_id" { |
|||
type = string |
|||
default = "${env("AZURE_CLIENT_ID")}" |
|||
} |
|||
|
|||
variable "client_secret" { |
|||
type = string |
|||
default = "${env("AZURE_CLIENT_SECRET")}" |
|||
} |
|||
|
|||
variable "tenant_id" { |
|||
type = string |
|||
default = "${env("AZURE_TENANT_ID")}" |
|||
} |
|||
|
|||
source "azure-arm" "squidex" { |
|||
subscription_id = "${var.subscription_id}" |
|||
client_id = "${var.client_id}" |
|||
client_secret = "${var.client_secret}" |
|||
tenant_id = "${var.tenant_id}" |
|||
|
|||
os_type = "Linux" |
|||
image_publisher = "Canonical" |
|||
image_offer = "0001-com-ubuntu-server-focal" |
|||
image_sku = "20_04-lts" |
|||
|
|||
managed_image_name = "squidex-${replace(var.squidex_version, ".", "-")}-{{ timestamp }}" |
|||
managed_image_resource_group_name = "squidex" |
|||
|
|||
location = "West US" |
|||
vm_size = "Standard_A2" |
|||
} |
|||
|
|||
build { |
|||
sources = [ |
|||
"source.azure-arm.squidex" |
|||
] |
|||
|
|||
provisioner "ansible" { |
|||
ansible_env_vars = [ |
|||
"ANSIBLE_HOST_KEY_CHECKING=False", |
|||
"ANSIBLE_SSH_ARGS='-F /dev/null -o ForwardAgent=no -o ControlMaster=auto -o ControlPersist=60s'", |
|||
"ANSIBLE_NOCOLOR=True" |
|||
] |
|||
extra_arguments = [ |
|||
"--extra-vars", |
|||
"squidex_version=${var.squidex_version}"] |
|||
playbook_file = "./ansible/playbook.yml" |
|||
use_proxy = false |
|||
} |
|||
|
|||
provisioner "shell" { |
|||
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'" |
|||
inline = [ |
|||
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync" |
|||
] |
|||
inline_shebang = "/bin/sh -x" |
|||
skip_clean = true |
|||
} |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
variable "squidex_version" { |
|||
type = string |
|||
default = "5.7.0" |
|||
} |
|||
|
|||
source "googlecompute" "squidex" { |
|||
project_id = "squidex-315304" |
|||
ssh_username = "root" |
|||
zone = "us-central1-a" |
|||
source_image_family = "ubuntu-2004-lts" |
|||
instance_name = "squidex-${replace(var.squidex_version, ".", "-")}-build-{{ timestamp }}" |
|||
image_name = "squidex-${replace(var.squidex_version, ".", "-")}-{{ timestamp }}" |
|||
image_family = "squidex" |
|||
image_storage_locations = [ |
|||
"us"] |
|||
} |
|||
|
|||
build { |
|||
sources = [ |
|||
"source.googlecompute.squidex" |
|||
] |
|||
|
|||
provisioner "ansible" { |
|||
ansible_env_vars = [ |
|||
"ANSIBLE_HOST_KEY_CHECKING=False", |
|||
"ANSIBLE_SSH_ARGS='-F /dev/null -o ForwardAgent=no -o ControlMaster=auto -o ControlPersist=60s'", |
|||
"ANSIBLE_NOCOLOR=True" |
|||
] |
|||
extra_arguments = [ |
|||
"--extra-vars", |
|||
"squidex_version=${var.squidex_version}"] |
|||
playbook_file = "./ansible/playbook.yml" |
|||
use_proxy = false |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
FROM squidex/squidex:5 |
|||
|
|||
ADD squidex.sh /squidex.sh |
|||
|
|||
RUN chmod +x /squidex.sh |
|||
|
|||
ENTRYPOINT ["/bin/sh", "/squidex.sh"] |
|||
@ -0,0 +1,13 @@ |
|||
#!/bin/sh |
|||
|
|||
export URLS__BASEURL="https://${DOMAIN}" |
|||
|
|||
export MONGO_STRIP="$(echo ${MONGO_RS_URL} | sed 's@mongodb://@@g' | sed 's@?replicaSet@Squidex?retryWrites=false\&replicaSet@g')" |
|||
|
|||
export EVENTSTORE__MONGODB__CONFIGURATION="mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@${MONGO_STRIP}" |
|||
export STORE__MONGODB__CONFIGURATION="mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@${MONGO_STRIP}" |
|||
export STORE__MONGODB__CONTENTDATABASE="Squidex" |
|||
|
|||
export ASPNETCORE_URLS="http://+:$PORT" |
|||
|
|||
dotnet Squidex.dll |
|||
@ -0,0 +1 @@ |
|||
FROM mongo:4 |
|||
@ -0,0 +1,7 @@ |
|||
FROM squidex/squidex:5 |
|||
|
|||
ADD squidex.sh /squidex.sh |
|||
|
|||
RUN chmod +x /squidex.sh |
|||
|
|||
ENTRYPOINT ["/bin/sh", "/squidex.sh"] |
|||
@ -0,0 +1,10 @@ |
|||
#!/bin/sh |
|||
|
|||
echo "Waiting 60 seconds ..." |
|||
sleep 60 |
|||
|
|||
export URLS__BASEURL="https://${DOMAIN}" |
|||
export EVENTSTORE__MONGODB__CONFIGURATION="mongodb://${MONGO}" |
|||
export STORE__MONGODB__CONFIGURATION="mongodb://${MONGO}" |
|||
|
|||
dotnet Squidex.dll |
|||
@ -0,0 +1,46 @@ |
|||
packer { |
|||
required_plugins { |
|||
vultr = { |
|||
version = ">= 2.3.1" |
|||
source = "github.com/vultr/vultr" |
|||
} |
|||
} |
|||
} |
|||
|
|||
variable "squidex_version" { |
|||
type = string |
|||
default = "5.7.0" |
|||
} |
|||
|
|||
variable "vultr_api_key" { |
|||
type = string |
|||
default = "${env("VULTR_API_KEY")}" |
|||
} |
|||
|
|||
source "vultr" "squidex" { |
|||
api_key = "${var.vultr_api_key}" |
|||
region_id = "lax" |
|||
plan_id = "vc2-1c-2gb" |
|||
os_id = "387" // Ubuntu 20.04 |
|||
hostname = "squidex-${replace(var.squidex_version, ".", "-")}-build-{{ timestamp }}" |
|||
snapshot_description = "squidex-${replace(var.squidex_version, ".", "-")}-{{ timestamp }}" |
|||
ssh_username = "root" |
|||
state_timeout = "10m" |
|||
} |
|||
|
|||
build { |
|||
sources = [ |
|||
"source.vultr.squidex" |
|||
] |
|||
|
|||
provisioner "ansible" { |
|||
ansible_env_vars = [ |
|||
"ANSIBLE_HOST_KEY_CHECKING=False", |
|||
"ANSIBLE_SSH_ARGS='-F /dev/null -o ForwardAgent=no -o ControlMaster=auto -o ControlPersist=60s'", |
|||
"ANSIBLE_NOCOLOR=True" |
|||
] |
|||
extra_arguments = ["--extra-vars", "squidex_version=${var.squidex_version}"] |
|||
playbook_file = "./ansible/playbook.yml" |
|||
use_proxy = false |
|||
} |
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
services: |
|||
- type: web |
|||
name: squidex_squidex |
|||
env: docker |
|||
repo: https://github.com/Squidex/squidex.git |
|||
dockerfilePath: ./packer/render/squidex/Dockerfile |
|||
dockerContext: ./packer/render/squidex/ |
|||
disk: |
|||
name: assets |
|||
mountPath: /app/Assets |
|||
sizeGB: 10 |
|||
healthCheckPath: /healthz # hanging |
|||
envVars: |
|||
- key: DOMAIN |
|||
sync: false |
|||
- key: MONGO |
|||
fromService: |
|||
name: squidex_mongo |
|||
type: pserv |
|||
property: hostport |
|||
- key: EVENTSTORE__TYPE |
|||
value: MongoDB |
|||
- key: IDENTITY__ADMINEMAIL |
|||
sync: false |
|||
- key: IDENTITY__ADMINPASSWORD |
|||
generateValue: true |
|||
- key: IDENTITY__GOOGLECLIENT |
|||
sync: false |
|||
- key: IDENTITY__GOOGLESECRET |
|||
sync: false |
|||
- key: IDENTITY__GITHUBCLIENT |
|||
sync: false |
|||
- key: IDENTITY__GITHUBSECRET |
|||
sync: false |
|||
- key: IDENTITY__MICROSOFTCLIENT |
|||
sync: false |
|||
- key: IDENTITY__MICROSOFTSECRET |
|||
sync: false |
|||
- key: ASPNETCORE_URLS |
|||
value: http://+:5000 |
|||
- type: pserv |
|||
name: squidex_mongo |
|||
env: docker |
|||
repo: https://github.com/Squidex/squidex.git |
|||
dockerfilePath: ./packer/render/mongo/Dockerfile |
|||
dockerContext: ./packer/render/mongo/ |
|||
disk: |
|||
name: db |
|||
mountPath: /data/db |
|||
sizeGB: 10 |
|||
Loading…
Reference in new issue